Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Set pbcopy to use UTF-8 by default' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Set pbcopy to use UTF-8 by default
Authored by: gshenaut on Jan 05, '09 10:01:35AM
I've never seen this problem and I use pbpaste/pbcopy all the time. One clue as to what's going on is this statement I found: "__CF_USER_TEXT_ENCODING [is] a representation of your default text encoding, which is determined by the first language in the Languages list in the International preference panel."
http://lists.apple.com/archives/applescript-users/2002/Aug/msg01523.html

On my system, I have English selected, and I assume that the original poster does as well, so I think that it may really have more to do with the fact that I have "US Extended" (which is Unicode, as opposed to "US", which is Roman) selected as my (only) Input Menu.

I personally recommend US Extended anyway, it is very convenient for typing languages other than English that use the basic Roman alphabet with diacritics. Even if that's not an issue for you, if you are going to use Unicode in the Terminal, then you should consider it anyway.

I'd be interested to hear if setting US Extended makes the problem of down-converted Unicode chars go away.

Cheers,
Greg Shenaut

[ Reply to This | # ]
Set pbcopy to use UTF-8 by default
Authored by: frank nospam on Jan 05, '09 10:34:03AM

Wow, I never looked that far down the languages list to see US Extended. Very good idea, thank you.



[ Reply to This | # ]
Set pbcopy to use UTF-8 by default
Authored by: darick on Jan 05, '09 01:17:05PM

As far as I can tell, changing from US to US extended on the input menu only changed the way the keyboard acts and didn't affect any of my file handling. I am now extremely confused; have you done anything else to your system to make it extra Unicode compatible?

However, changing the input menu is a great solution to some other problems--I wish I had know about US extended earlier.



[ Reply to This | # ]
Set pbcopy to use UTF-8 by default
Authored by: gshenaut on Jan 07, '09 08:19:09AM

The fact that my login shell is /bin/ksh might be a factor, I don't know. I can't think of anything else.



[ Reply to This | # ]
Set pbcopy to use UTF-8 by default
Authored by: Anonymous on Jan 07, '09 11:28:40AM

Just curious: what does ksh give you that bash doesn't?



[ Reply to This | # ]
Set pbcopy to use UTF-8 by default
Authored by: rdm on Jan 06, '09 10:04:42AM

Although I would agree that using Unicode throughout would be a good idea, I'm not sure most people are aware of the issues involved with 'switching'. That is, trying to use a Unicode input method on existing documents already started with non-Unicode encoding. [Documents can't switch all the 'other' text automatically, even if everything is displayed 'correctly'.]

Particularly if users have the 'Use one input source in all documents' checked in the Input Method selection Preference Pane, as this may force Unicode input in previously non-Unicode documents.

Until all internal text objects on the Mac are Unicode with simply different input/display methods, mixing text representations within a single document can be very problematic.

So just be cautious about switching to Unicode mid-stream, and be aware of potential issues.



[ Reply to This | # ]