-   Linux - Software (
-   -   Chinese encoding not encoding in kate (

linuxmandrake 12-12-2010 05:00 AM

Chinese encoding not encoding in kate
I saved a plain text file with UTF8 encoding. I need to be able to copy and paste chinese characters into the xhtml. It doesn't seem to save it properly as when I reopen the file after saving all the chinese characters gets encoded into garbage text. What am I doing wrong?

rikijpn 12-12-2010 08:50 AM

I don't use kate, but I don't think it's an encoding problem. How did you read the file and get garbage?
You can use the "file" command to check a file's encoding.

file filename
This would return

filename:        UTF-8 Unicode text
On Japanese(chinese and korean too) languages properly encoded in unicode.

If it's not correctly encoded maybe you have an input problem... Try another editor to check?

If it's correctly encoded, then the problem should be the method in which you are reading the file, I guess.
If you checked the text in a browser remember to put the

<html xmlns="" xml:lang="zh" lang="zh">

<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
Telling the browser the language and encoding information to view the page properly.

I've only written pages in Japanese but they should be kinda the same method.

All times are GMT -5. The time now is 05:33 PM.