problem with utf-8 in WordPad.


Recommended Posts

Well here is what happened. I know this shouldn't be posted in the Mac section; but I need opinion from Mac users.

I had Hackintosh installed; but for some STUPID reason; I un-installed it; and installed Windows 7.

So I had a project going on, that I edited .php files with Wordpad. I was writing the values (part of the PHP) in Cyrillic alphabet. So I saved the file, and... a total disaster. The Cyrillic alphabet was turn into questions (Почетна = ??????? --- for quick example). I lost all my 1 and a half hour.

****ty Windows :@ The don't even know how to implement UTF-8 technology in their Operative System.

I'll install Hackintosh again, that's for sure... and this time; forever.

And of course... I had to re-done the file, again. If i was on a mac it would only last 1 and a half hour. But on Windows, it was aprox. 3 hours! :s

Edited by Colin-uk
changed title.
Link to comment
https://www.neowin.net/forum/topic/903894-problem-with-utf-8-in-wordpad/
Share on other sites

  On 23/05/2010 at 21:15, jamesyfx said:

Wordpad outputs tabbing and stuff better than Notepad if you open some php documents. I only observed this about 5-6 years ago though.

Thats why you use neither. Although notepad > wordpad.

Notepad2 or notepad++ that supports proper formatting and syntax highlighting.

  On 23/05/2010 at 20:50, MAVEЯiCK ☭ said:

****ty Windows :@ The don't even know how to implement UTF-8 technology in their Operative System.

I understand your frustration, but you must understand that both Windows and an application like WordPad has a learning curve. On Windows, plain text normally does not mean Unicode. Maybe it does on OS X, but Windows is not OS X and does not attempt to emulate OS X behavior. This is something you have to learn. Windows itself, however, uses UTF-16 internally, and Unicode on Windows is a synonym for UTF-16.

If you want to save UTF-16 in WordPad, you can. You simply select save as Unicode text document. Presumably you chose to save non-unicode text (an option that is important to have available to maximize compatibility.)

As for UTF-8, WordPad probably does not support it, as WordPad is not a web editor and UTF-8 is of little value on Windows where the native text format is UTF-16. Notepad I think does have an option for UTF-8, as will text editors designed for web work. You can also find editors that support UTF-32, or whatever other encoding you can think of. It's about picking the right tool for the job.

You can't write PHP code in Notepad. And I am not writing PHP code, I am only editing it. I am against 3rd party software; like Notepad +. I also tried on Notepad, and what I had to do is copy the file from Wordpad (because in Notepad it looks unformated; and it won't work), than go to File > Save As... > UTF-8.

Still OS X has better unicode support. I have some Cyrillic software installed on my Windows, witch are not displaying correctly. Damn. I can read Cyrillic only on Google Chrome, lol.

  On 24/05/2010 at 08:43, MAVEЯiCK ☭ said:

You can't write PHP code in Notepad. And I am not writing PHP code, I am only editing it. I am against 3rd party software; like Notepad +. I also tried on Notepad, and what I had to do is copy the file from Wordpad (because in Notepad it looks unformated; and it won't work), than go to File > Save As... > UTF-8.

Still OS X has better unicode support. I have some Cyrillic software installed on my Windows, witch are not displaying correctly. Damn. I can read Cyrillic only on Google Chrome, lol.

Quote of the century.

Also, please stop abusing semi-colons.

  On 24/05/2010 at 08:43, MAVEЯiCK ☭ said:

You can't write PHP code in Notepad.

Yes, you can. It's just text.

  On 24/05/2010 at 08:43, MAVEЯiCK ☭ said:

I am against 3rd party software; like Notepad +.

Why? So you would rather use software that was not designed to do what you're trying to do, than simply download something that was?

  On 24/05/2010 at 08:43, MAVEЯiCK ☭ said:

because in Notepad it looks unformated; and it won't work

I suspect the problem you had was that the file you were editing came from an OS with different line break sequence than Windows uses. Notepad can't read those, while WordPad automatically converts them. Windows uses a carriage return and a line feed, while OS X uses only a line feed. Older versions of MacOS used just a carriage return. The reason for these differences is historical.

  On 24/05/2010 at 08:43, MAVEЯiCK ☭ said:

Still OS X has better unicode support. I have some Cyrillic software installed on my Windows, witch are not displaying correctly. Damn. I can read Cyrillic only on Google Chrome, lol.

No. Windows fully supports Unicode. If you have buggy software installed, then that is not Windows' fault, no matter how many lols you put in your post. It's also not Windows' fault that you made a mistake.

  On 24/05/2010 at 07:47, hdood said:

...

If you want to save UTF-16 in WordPad, you can. You simply select save as Unicode text document. Presumably you chose to save non-unicode text (an option that is important to have available to maximize compatibility.)

...

I was having issues trying to get this working (Notepad + Notepad2 could read it, WordPad couldn't, etc.), it turns out WordPad will only read files as Unicode if they're UTF-16 LE with the Byte Order Mark, anything else is treated as ASCII (Big Endian reads in as random Unicode characters, nice to see it doesn't check stuff)

That was mainly for my own benefit, Notepad is much smarter when it comes to the encoding (UTF-8, UTF-16, BE/LE with or without a BOM, etc.)

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.