Test for invalid unicode in file name

Madison Kelly linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Wed May 11 03:00:49 UTC 2005


Lennart Sorensen wrote:
> On Thu, May 05, 2005 at 11:53:49PM -0400, Madison Kelly wrote:
> 
>>Thanks for the reply!
>>
>>The trick is though that I have several valid unicode file names (ie: 
>>files using Japanese kana/kanji characters). These file names are 
>>accepted just fine and it is important that unicode support remains. If 
>>there is a regex that cought all valid unicodes and wasn't too expensive 
>>that would be great.
> 
> 
> Are you sure the filenames aren't in shiftjis or something instead?
> That would be incompatible with unicode for sure.

Shoot, it may actually be ShiftJIS... If that is the case, how can I 
"translate" it into something that postgresql would not choke on? I, 
wrongly I guess, thought Unicode included Japanese (et. al.). How is a 
poor programmer to make a program that can handle all these different 
encodings in a sane way?

This being a backup program, is there any way I can handle files that 
could be named in any number of different ways or do I need to 
brute-force in support for each possible locale or encoding method?

Thanks.

Madison

PS - I will play with your test program in a bit. Thank you very much 
for that! I learn best through example. ^_^

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Madison Kelly (Digimer)
TLE-BU, The Linux Experience; Back Up
http://tle-bu.thelinuxexperience.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list