![]() Read my emails when I use accents" problem comes down to one naive You have to know what encoding it is in or you cannot interpret it orĪlmost every stupid "my website looks like gibberish" or "she can't If you have a string, in memory, in a file, or in an email message, Head in the sand and pretend that "plain" text is ASCII. If you completely forget everything I just explained, please remember The Single Most Important Fact About Encodings This piece explains more about encoding and specifically, why ASCII!=UTF-8 and why you need to know how you encoded your text. *You were interested enough to ask, so perhaps you already understand what the writer of this article is telling us. TL DRĭon't worry, your "ASCII" text files are UTF-8 files in disguise (their UTF-8-ness cannot be detected), and will be parsed as you want & expect. Redirecting echo creates a file that file says is ASCII (try it yourself!) $ echo ユニコーン > rainbows file rainbowsĪppending non-ASCII characters automagically changes the encoding? No, just forces file to see that really, the encoding is UTF-8, because it can no longer be limited to ASCII. ![]() When all your chars are rainbows file rainbows Indeed, the same holds if you create a "plain text" (dubious term*) file by any method, and this answer has the reason: However, unless these files contain non-ASCII characters**, they will be detected as ASCII. ![]() You can indeed select UTF-8 encoding in gedit, or any other text editor. So, I gave Bruni a screenshot for their answer to show what they meant.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |