Click here to Skip to main content
15,867,141 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi iam using Encoding.UTF8.GetBytes(postData) to post my polish language content to my website database. But when i open the text in cpanel phpmyadmin i see different content (i say different because i see tonnes of garbage things).

You see on pc side i am able to read and write polish content using a RichTextBoxStreamType.UnicodePlainText. The text file while i open has same content as the file read.

But on server i don't know what changes. Isn't UTF8 a unicode format? Do i have to do something different to load and read polish content from online pages?

Regards,
Posted

1 solution

UTF is just one of Unicode UTFs, one of the most practical one's in most cases, and standard de-factor for Internet and other uses. All UTFs represent 100% of all Unicode code point and have one-to-one correspondence but not trivial one. In Windows, presentation of Unicode stings in memory is UTF-16LE. Of course, if your try to interpret one UTF assuming this is some other UTF, you will totally mess up things.

On UTFs, please see:
http://en.wikipedia.org/wiki/Unicode[^],
http://www.unicode.org[^],
http://www.unicode.org/faq/utf_bom.html[^],
http://en.wikipedia.org/wiki/Unicode[^].

As to RTF, the presentation of Unicode in is it somewhat messed up. This is because RTF was created before Unicode was introduced. You can find further detain here:
https://en.wikipedia.org/wiki/Rich_Text_Format#Character_encoding[^].

See also:
http://www.zopatista.com/python/2012/06/06/rtf-and-unicode/[^].

From your question, is not clear how your character messed up, because you did not show your code and described the steps, but it's very likely. Same thing about the ways to untangle the problem: it is possible but depends on what was done. I think you can do it by yourself you if learn documentation and retreat your steps.

Despite of wide support of RTF on Microsoft platforms and libraries, you should understand that this is a proprietary format, and pretty much obsolete one. From the standpoint of Internet and WWW standards, using it… well, it cannot be considered as something serious.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900