Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > Can't read Japanese .txt files saved in Unicode 8

Can't read Japanese .txt files saved in Unicode 8
Thread Tools
Dedicated MacNNer
Join Date: May 2002
Location: Tokyo
Status: Offline
Reply With Quote
Jul 24, 2003, 11:02 PM
 
This is bit of an odd one... I'm doing some work in Flash MX, loading external .txt files into movies and according to Flash, these files should be saved in Unicode 8 or 16.

When saved in 16, I have no problems locally, but uploaded to the server, none of the .txt files load. When saved as unicode 8 files, they load, but the Japanese becomes gibberish.

Now this would be a post for the web developer forum, only the problem is also OS based - when I save a Japanese text file as unicode 8, close it, then re-open it - it becomes gibberish. It's also gibberish when previewed in the Finder's column view. This happens on both Japanese and English-based systems running 10.2.6, and I'm using textedit.

Is anyone able to explain why this is happening, and if there's a workaround?
     
Junior Member
Join Date: Jan 2000
Status: Offline
Reply With Quote
Jul 24, 2003, 11:54 PM
 
I'm not clear on how you're creating or converting these files, but as far as uploading them... UTF files are not ASCII. Assuming you're using FTP, are you sending them in binary mode? ASCII mode will corrupt them.
     
Dedicated MacNNer
Join Date: May 2002
Location: Tokyo
Status: Offline
Reply With Quote
Jul 25, 2003, 12:29 AM
 
Originally posted by jayg:
are you sending them in binary mode? ASCII mode will corrupt them.
Well I'm not entirely sure... initially I was using Dreamweaver, then tried it in Fetch with all the various settings - 'raw data' 'text' 'MacBinary III' 'Binhex' 'Applesingle'. This didn't seem to change anything.

And I can't figure out why as soon as I save it as UTF-8, it becomes illegible locally.
     
Mac Elite
Join Date: Oct 2000
Status: Offline
Reply With Quote
Jul 25, 2003, 06:15 AM
 
Originally posted by superblue:
Well I'm not entirely sure... initially I was using Dreamweaver, then tried it in Fetch with all the various settings - 'raw data' 'text' 'MacBinary III' 'Binhex' 'Applesingle'. This didn't seem to change anything.

And I can't figure out why as soon as I save it as UTF-8, it becomes illegible locally.
First I think you should try using the trial version of Transmit (panic.com) and use its binary mode and see if that works.

Secondly, I'm not sure, but I would think that Unicode-8 means 8-bit and Unicode-16 means 16-bit. 8-bit only allows 255 characters, while 16-bit allows 65,000+ characters. That is probably why you need to use Unicode-16, but someone correct me if I'm wrong.
     
Dedicated MacNNer
Join Date: May 2002
Location: Tokyo
Status: Offline
Reply With Quote
Jul 25, 2003, 07:29 AM
 
OK - thanks for the tip, I'll have a go at that when I'm back in the office on Monday. Re: the 8 vs. 16 thing, Macromedia seem to say either's ok, though a guy over at Apple's forum told me that UTF-16 was in no way an accepted standard and it's much safer to use UTF-8...
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 08:23 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2