Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Unicode to UTF8?

Can it be scripted?



1:37 pm on Oct 11, 2005 (gmt 0)

10+ Year Member


Just wondering if anyone has any tools for converting a text file from unicode to utf8? I've been doing it with notepad but i'd like a more automated solution.


Alternative Future

1:41 pm on Oct 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Hello ciscoforum,

Using native2ascii [google.com] you can do the following:

1 - Open the original file in Notepad. Make any necessary changes, then Save As, Unicode.

2 - Using Ultra Edit or similar, convert the file to UTF-8 (Unicode to UTF8, Unicode Editing)

3 - Use the java tool native2ascii to convert the file using the following command (from Command Prompt):

4 - native2ascii -encoding UTF8 [source file] [destination file]

e.g.native2ascii -encoding UTF8 D:\work\yourfile.ext




2:00 am on Oct 12, 2005 (gmt 0)

10+ Year Member

Thanks for that.

Tried native2ascii but it just turned it into a huge mess.

Thanks anyway.


9:12 am on Oct 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

First you need to figure out what encoding your file really is written in.

"Unicode" is not an encoding for file data, it's just a numbering system for characters. UTF-8 is one of several possible ways to encode unicode data for storage in files. Other popular ones are UTF-16 and UTF-32, both of which exist in big-endian and little-endian versions.

As long as you just know "unicode", your guess is as good as mine about the actual contents of the file, and the best way to convert it.


10:34 am on Oct 12, 2005 (gmt 0)

10+ Year Member

O sorry

The file is currently UTF-32


Featured Threads

Hot Threads This Week

Hot Threads This Month