I'm trying to do exactly what the title say, insert an emoji into a string in Delphi 2007, just like the example below :  procedure TForm1.Button1Click(Sender: TObject); var s : string; begin s := 'This is my original string (y)'; s := ansireplacestr(s,'(y)','👍'); showmessage(s); end;   I can even paste the emoji into IDE's code, but in runtime showmessage results in this :  This is my original string ????  Is there a way to achieve this task in Delphi 2007 ? Due to several reasons i can't upgrade Delphi right now.  Someone said my question is solved on this topic :    But this topic just says to use third-party components, without telling exactly how to do it.  EDIT : After suggested, i tried to use the functions pos, delete and insert and a widestring var :  function addEmoji(mystring : widestring) : widestring; var r, aux : widestring; p : integer; begin r := mystring; while pos('(y)',r) &gt; 0 do   begin     aux := r;     p := pos('(y)',aux);     Insert('👍',aux,p);     delete(aux,pos('(y)',aux),3);     r := aux;   end; result := r; end;   But the result is the '(y)' replaced by '????'.
Background: This question relates to versions of Delphi below 2009 (ie without Unicode support built in). I have a specification that requires me to transmit a Unicode encoded string over a TCP connection but I do not have Delphi 2009.   Question Is there a single function or very small library (I don't need too much bulk) that I can use to encode a single string into UTF-8 immediately prior sending over the wire? As a second part of my question: if there are UTF-8 encoded strings being sent back as a response, I guess I would then need another function to get it back into a Delphi string format. I understand the limitations of such Unicode support in this way.
Is the topological product $\Pi \{G_\alpha: \alpha < \kappa\} $ a topological group? is it possible to redefine { and } in C? How to check if specific column exists in an Access database table I know that $\operatorname{Spec} \mathbb{C}[x]$ can be identified with the set $\mathbb{C}\cup *$, where $*$ is a generic point via the correspondence  $$ \prod_{i}(x-a_i) \leftrightarrow \{a_i\}_i , \ \ \ \ (0)\leftrightarrow *. $$ This correspondence holds for any $\operatorname{Spec} k[x]$ with algebraic closed field $k$.   When $k$ is not algebraic closed, how should one understand $\operatorname{Spec} k[x]$? Why do airplanes experience negligible Coriolis force while bullets experience the Coriolis force in long range shooting, even though the mass of airplane is much bigger than a bullet? Etymology for “Mc‑” and “O’‑” prefix in surnames There is clearly a prefix in names like McDonald, McChrystal, O’Brian, O’Neal.  What does this Mc- and O- prefix signify? It looks like Donald, Chrystal, Brian, Neal are perfectly fine names on their own, so why is there a prefix before it? Given a polynomial $f(x)$ with integral coefficients and $f(x) = 37$ has 5 distinct integral roots, find the number of integral roots of $f(x) = 41$?  My Approach: Say $f(x) = (x-r_1)(x-r_2)(x-r_3)(x-r_4)(x-r_5)g(x) + 37$, where $r_i$ are the distinct integers.   Now for $f(x) = 41$ we have $(x-r_1)(x-r_2)(x-r_3)(x-r_4)(x-r_5)g(x) = 4$, so the factors can be $\pm 1, \pm2$ or $\pm 4$. Given $r_i$ are distinct at most two of them will give $\pm1$, then there can be both of $\pm 2$ or one of $\pm 4$. This is where I get lost, since even if I use all of $\pm1, \pm2$, I will be still be left with one $x-r_i$ factor. What about that? Does it matter that 37 and 41 are primes, or is it just a coincidence?  Thanks in advance. How can I disable Amazon search results in the Dash? I've come across quite a few answers that request the asker to, for example: "send the user an email", after which the answerer will provide them with the code or other resources they're looking for.  A few examples:          Should we take action against these questions?  I feel like these answers aren't appropriate (see my answer below).  Update:  Perhaps there are some cases where this is acceptable. I've seen a few questions regarding a particular piece of commercial software where the author/developer of the software answers, telling the asker to contact either them or their organization's in-house support.  I'm on the fence about this case. If I came across a question here describing a similar problem I was having, it would be useful to me to have the support information and know that I could contact it for assistance.  I'm interested in others' opinions on this situation in particular. Why does an electron shell further away from nucleus has higher energy level? Using electrical potential energy $V=\frac{1}{4\pi \varepsilon_0} \frac{Q_1 Q_2}{r}$ , a particle further away from nucleus has lower magnitude of energy.  Using Coulomb's law, a particle further away from nucleus experiences weaker attraction, hence less energy is needed to maintain orbit$^\star$ around that e-shell compared to a electron shell closer to nucleus, hence the one closer to nucleus supposedly should have higher energy.  $^\star$I know in reality $e^-$ does not orbit around a atom, but its position exists as a probability density or radial probability function. How do I list the default installed packages? What did the public at large know about the assassination attempt on Palpatine and how he survived it? I mean, for the people of the galaxy, Palpatine was just a politician past his middle ages. How could this man have survived against four Jedi Council members in his office while “unarmed,” say that the attempt “left him scarred and deformed,” and people believe in this? Why does increasing the number of features reduce performance? I'm trying to gain an intuition as to why increasing the number of features could reduce performance.  I'm currently using an LDA classifier which performs better bivariately among certain features but worse when looking at more features.  My classification accuracy is performed using a stratified 10-fold xval.    Is there a simple case of when a classifier would work better univariately than bivaraiately to gain a somewhat physical or spatial intuition of what is happening in these higher dimensions? In Germany, crypto-currencies like Bitcoin are all over the news lately, making me aware of the fact I don't know much about them.  A journalistic TV program I was watching yesterday even claimed crypto-currencies are a real investment option... but I'm not so sure about that.  On one hand, I've been reading that across the ocean (USA and Canada), first ATMs have been setup that handle crypto-currencies.  On the other hand, I can not find any information if any crypto-currency is regulated (or even accepted) like common currencies (US dollar, Euro, Yen, etc.) are.  Can crypto-currencies really be regarded as a solid/conservative investment option like with regular currencies, or do I have to think of crypto-currencies like investing in "pork bellies" where risk tends to outrule chance, or are crypto-currencies more like fantasy-football and nothing one would/should seriously consider when it comes to planning an investment strategy?   Where exactly do I categorize crypto-currencies? Is there a way to move a Trello Checklist to a different Card? I often need to consolidate (combine) Checklists from a couple of Cards into one Card.  Any way to do this? How did Princess Leia survive this? In the Last Jedi movie, there is a scene where      her spaceship is taken down, Princess Leia is thrown into outer space, and seen floating there, frozen.    However, she manages to survive this, while any ordinary human being couldn't.   How did she manage this? Is this done by using the Force? How do I delete a file whose name begins with "-" (hyphen a.k.a. dash or minus)? How do I simplify and evaluate the limit of $(\sqrt x - 1)/(\sqrt[3] x - 1)$ as $x\to 1$? Consider this limit:  $$ \lim_{x \to 1} \frac{\sqrt x -  1}{ \sqrt[3] x -  1}  $$  The answer is given to be 2 in the textbook.  Our math professor skipped this question telling us it is not in our syllabus, but how can it be solved? For some of the apps I've developed (then proceeded to forget about), I've been writing plain SQL, primarily for MySQL.  Though I have used ORMs in python like , I didn't stick with them for long.  Usually it was either the documentation or complexity (from my point of view) holding me back.  I see it like this: use an ORM for portability, plain SQL if it's just going to be using one type of database. I'm really looking for advice on when to use an ORM or SQL when developing an app that needs database support.  Thinking about it, it would be far better to just use a lightweight wrapper to handle database inconsistencies vs. using an ORM. Pandemic, Global Epidemic, Epidemic, Endemic I really want to hear from the experts the definitions of all 4 terms especially whether global epidemic is equivalent to pandemic. Or should this question be directed to the epidemiologist?   Pandemic Global Epidemic Epidemic Endemic   I have Googled the terms and I understand the definition of 1), 3) and 4). In short the definition is based on geographical location and scale of outbreak, Pandemic is an outbreak of disease on a global scale (e.g. HIV). Epidemic is an outbreak of disease on a localised area. Endemic is a disease in a localised area. However, a definition for Global Epidemic is not available online.  Recently, WHO mentioned that "“It is important to put this on the table: this virus(Covid19) may become just another endemic virus in our communities, and this virus may never go away,” WHO emergencies expert Mike Ryan told an online briefing." Isn't covid19 considered a pandemic since it is on a global scale and is spreading rapidly?  Another term that I come across often is Global Epidemic. For example in the WHO website, HIV is listed as Global Epidemic. Does that mean Pandemic and Global Epidemic are the same?