- HOW FIND UNKNOWN 8BIT ENCODING OF MY MAC TEXT FILE FOR MAC
- HOW FIND UNKNOWN 8BIT ENCODING OF MY MAC TEXT FILE MAC OS X
- HOW FIND UNKNOWN 8BIT ENCODING OF MY MAC TEXT FILE CODE
- HOW FIND UNKNOWN 8BIT ENCODING OF MY MAC TEXT FILE WINDOWS
Please use `-L language', or `-L none' if your language is not supported x.srt: Non-ISO extended-ASCII text, with CRLF line terminatorsĮnca: Cannot determine (or understand) your language preferences. When I try to figure out what the encoding it give: file -i x.srt So I want to convert it to utf8 to be able to read it. srt file that displays as gibberish when I open it in gEdit in ubuntu. I changed the file to 0x08000100:0, and now triggering the Finder's Quick Look on UTF-8 text/plain files displays extended characters properly.Įcho "0x08000100:0" > ~/.CFUserTextEncoding does the trick, but this is known to cause problems when saving files in Adobe Illustrator CS5.I have a. To confirm what the file changed to, you can open Terminal and type cat ~/.CFUserTextEncoding, which yielded 0:3 when I changed my preferred language from English to Deutsch. To change the preferred language go to Language & Text under System Preferences and move a new language the top of the list. The value after the colon represents the user's preferred language. A list of encodings and the associated number can be found in the CFString Reference The 0 in my file is for kCFStringEncodingMacRoman. The first number to the left of the colon represents the default encoding. Its value should be constructed with the format string "0x%X:0:0", where %X is replaced by the UID of the logging in user.īy default, my copy of ~/.CFUserTextEncoding contained 0:0. The environment variable name is _CF_USER_TEXT_ENCODING. You can prevent this access by setting an environment variable that tells Core Foundation the default text encoding to use. If you switch the EUID to the UID of the logging in user and then call CF, you may have problems when Core Foundation accesses this file.
HOW FIND UNKNOWN 8BIT ENCODING OF MY MAC TEXT FILE MAC OS X
Below is an excerpt from Technical Note 2228 of the Mac OS X Reference Library with some more information:Ĭore Foundation tries to access the user's home directory to determine their default text encoding (stored in the file ~/.CFUserTextEncoding). Browsing those sites and related links I found this: ~/.CFUserTextEncoding stores the default text encoding and preferred language for a user. Regarding those, I thank your reply, but I'll need a more useful solution than just blaming MS. TextEdit is the least of the problems, the main problem lies on all the Mac applications which text encoding defaults I cannot customize. I'd wish for a better alternative (is Mac OS, I do have high expectences) So I change one nuissance with another, which is not a permanent solution.
HOW FIND UNKNOWN 8BIT ENCODING OF MY MAC TEXT FILE WINDOWS
If I change open default encoding in TextEdit preferences the problem with Windows encoded files will be fixed, but then the problem will appear with files saved with Mac default encoding.
HOW FIND UNKNOWN 8BIT ENCODING OF MY MAC TEXT FILE FOR MAC
"Automatic" in Mac apps tends to mean "default" (not detection), which can result in MacRoman be used for Latin text, which generates the character differences you described in your first post.Īs for Mac Excel and Word, if they are not reading stuff made in Windows Office correctly, I think that is something MS will have to fix.
If you set your open/save default in TextEdit Preferences to Latin-1 or UTF-8 you should be able to minimize the kind of problems you have described related to that app.
What is next, and I keep the question open for that, is to find a way to do the same in all the oher applications that are presenting the issue: preview mode in FInder, Word, Excel and Stata. I will ask app developers for ways to customize -or at least to know- the text encoding used. Thanks for helping me finding part of the solution: I will convert every "problematic" file to UTF-8 encoding format, configure TextEdit and TextWrangler to save files as UTF-8 for Windows compatibility. However, the problem is still there with the remaining apps, for example: Mac Word and Excel. This successfully solves the problem for viewing and writting plain text files across Windows and Mac.
HOW FIND UNKNOWN 8BIT ENCODING OF MY MAC TEXT FILE CODE
Only by indicating manually the code (ISO Latin-1) the file is displayed properly, so I check this option in the TextWrangler preference "If file's encoding can't be guessed, use". I installed TextWrangler and opened one of the files that TextEdit displayed wrongly, but even even TextWrangler fails to identify the original file encoding. I'd wish there it were that simple, or al least that a complex solution would be available for all this encoding problems, because some apps won't let me know which encoding they use or configure their file outputs in a different/custom encoding system.