Mac encoding
-
Hello guy038,
this file isn’t supposed to be used directly. It’s part of the codecs module which uses it internally
when you specify its codec. E.g.import codecs with codecs.open(r'd:\macroman.txt', 'r', encoding='macroman') as fin: file_content = fin.read() with codecs.open(r'd:\macroman_utf8.txt', 'w', encoding='utf-8') as fout: fout.write(file_content)First with block opens a file which is assumed to be macroman encoded, reads it, saves it in variable file_content and
closes file automatically.Next with block writes the file with utf-8 encoding and, again, closes automatically.
Cheers
Claudia -
Thank you very much, guy038.
I’m sure that’d do the trick. I’m just surprised we don’t have an option for Mac Roman right in the menu. Do you think there’s a reason for that? It’s just another encoding method, right? Is it fundamentally different from any of the iso-8859-x? -
Hi, Valerio,
Do you think there’s a reason for that?
May be, it’s just because Notepad++ is rather “Windows oriented” !
Is it fundamentally different from any of the iso-8859-x?
Not at all. It’s just an other encoding, as all the others !
You may, also, ask for adding the MAC Roman encoding, in N++, at the address, below :
https://github.com/notepad-plus-plus/notepad-plus-plus/pulls
However, as you can see, you have to be ( very ) patient :-(( There are plenty of requests, in that place !!
Cheers,
guy038
-
Thanks for sharing such amazing info
مجلة رقيقة -
Thanks for sharing
فوائد الليمون -
At least there is an codepage on windows Code Page 10000 Macintosh Roman:
https://msdn.microsoft.com/en-us/library/cc195076.aspx
so adding support should be not to complicated. -
I’m trying to find a way to convert to macRoman. (needed for embedding subtitles into quicktime videos)
I am trying to use the python scripting option.
using:import codecs
with codecs.open(r’d:\utf8.txt’, ‘r’, encoding=‘utf-8’) as fin:
file_content = fin.read()
with codecs.open(r’d:\macroman.txt’, ‘w’, encoding=‘macroman’) as fout:
fout.write(file_content)I end up with macroman.txt encoded as ANSI, and empty.
Any help here would be much appreciated.
-
what about printing file_content to the python script console using
console.write(file_content)
Cheers
Claudia -
Thanks for sharing such amazing info
sihtk.com
كل ما يهمك سيدتي -
I did find an Encoding option for it, but it’s buried where you wouldn’t expect!
Encoding > Character Sets > Cyrillic > Macintosh
Presto, all the Õ symbols become ’ symbols the way they were typed on the Mac!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login