Jump to content
Chinese-Forums
  • Sign Up

Mac OS X: GB18030, GB2312/GBK encoded files not recognized


etm001

Recommended Posts

Hi,

 

I'm running Mac OS X Yosemite. On the occasions I download files from mainland China, the files names and contents of the files are often complete gibberish. That is, Mac OS X isn't recognizing the encoding as GB18030 or GB2312/GBK. I know these files are encoded in GB18030 etc. because, at least for text files I can set my text editor (TextWrangler) to import the file using that encoding, and most of the time - but not always - the file will open correctly.

 

Does anyone know how to get Mac OS X to recognize the encoding of these files? In "Languages and Region" I have both traditional and simplified Chinese included as preferred languages. 

 

It's also worth noting that, these files were most likely created on a Windows computer, and perhaps that has something to do with the problem as well.

  • Like 1
Link to comment
Share on other sites

you can convert encodings with iconv, just search stackoverflow or google for "convert encoding osx". Another quick way is to open the file in a webbrowser, choose the appropriate encoding from the menu and then copy-paste the text back into an editor to save it as a text file.

  • Like 1
Link to comment
Share on other sites

Does anyone know how to get Mac OS X to recognize the encoding of these files?

It's not a global thing, it will depend on the application.  The easiest thing is what wibr said, using iconv or your browser to convert to utf8, and then go from there.

Link to comment
Share on other sites

Join the conversation

You can post now and select your username and password later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Click here to reply. Select text to quote.

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...