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
Share on other sites

php in wordpad... did you save as a plain txt document? and WHY Wordpad instead of Notepad?

Same thing I was going to ask!

A user's error is not a fault of the OS.

Link to comment
Share on other sites

Ummmmm I hope this is just a joke/troll but you never write code in wordpad. Wordpad can append extra characters into the files as well that parsers will not like.

This blows my mind. Sorry. Notepad++ or notepad2 anyone?

As stated before. User error not OS error.

Link to comment
Share on other sites

its not the OPERATING SYSTEMS fault, its the USERS fault. why in hell would you use WordPad to do PHP lol. i love when people blame stuff on things when in reality its their fault for not being smart enough

Link to comment
Share on other sites

Did windows told you that you can write php in wordpad heck even in notepad. If it did that you're right windows is stupid. You could you notepad 2 for editing php.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

****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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

You can't write PHP code in Notepad.

Yes, you can. It's just text.

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?

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.

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.

Link to comment
Share on other sites

In Note pad, when you click file/save as, notice the third option at the bottom that says 'encoding'? The default is ANSI, but the dropdown box gives UTF-8 as an option.

Link to comment
Share on other sites

...

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.)

Link to comment
Share on other sites

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

    • No registered users viewing this page.