Prev: Fedora Core 11
Next: e100: eth1: e100_request_firmware: Failed to load firmware "e100/d101m_ucode.bin":-2
From: Marcel Bruinsma on 29 Sep 2009 05:20 Am Montag, 28. September 2009 12:52, syd_p a écrit : > I entered the commands as suggested >> LANG=en_US.CP1252 locale -> Bad >> LANG=en_US.ISO-8859-15 locale -> Good >> LANG=en_US.ISO-8859-1 locale -> Good >> LANG=en_US.UTF-8 locale -> Good Then run your application with latin9 : LANG=en_US.ISO-8859-15 application ... It should no longer convert the 'special characters' to question marks. Simple test : LANG=en_US.ISO-8859-15 tr -d '\000-\177' <file | od -b -- printf -v email $(echo \ 155 141 162 143 145 154 142 162 165 151 \ 156 163 155 141 100 171 141 150 157 157 056 143 157 155|tr \ \\\\) # Live every life as if it were your last! #
From: Marcel Bruinsma on 29 Sep 2009 05:37 Am Dienstag, 29. September 2009 10:31, syd_p a écrit : > But with LANG=C which I thought was only 7 bits the following > printfs work just fine. > > $ printf "(octal 353) is the character \0353\n" > (octal 353) is the character ë > printf "(octal 361) is the character \0361\n" > (octal 361) is the character ñ Good, the typeface (font) has the characters you need. > These are two of the characters in the MSSQL db which the > application (not open source) handles as "?". Check if the application is really the cause of the problem. For file 'foo', generated by application, run : LANG=en_US.ISO-8859-15 tr -d '\000-\177' <foo | od -b -- printf -v email $(echo \ 155 141 162 143 145 154 142 162 165 151 \ 156 163 155 141 100 171 141 150 157 157 056 143 157 155|tr \ \\\\) # Live every life as if it were your last! #
From: syd_p on 29 Sep 2009 07:43 On 29 Sep, 10:37, Marcel Bruinsma <m...(a)nomail.afraid.org> wrote: > Am Dienstag, 29. September 2009 10:31, syd_p a écrit : > > > But with LANG=C which I thought was only 7 bits the following > > printfs work just fine. > > > $ printf "(octal 353) is the character \0353\n" > > (octal 353) is the character ë > > printf "(octal 361) is the character \0361\n" > > (octal 361) is the character ñ > > Good, the typeface (font) has the characters you need. > > > These are two of the characters in the MSSQL db which the > > application (not open source) handles as "?". > > Check if the application is really the cause of the problem. > For file 'foo', generated by application, run : > LANG=en_US.ISO-8859-15 tr -d '\000-\177' <foo | od -b > > -- > printf -v email $(echo \ 155 141 162 143 145 154 142 162 165 151 \ > 156 163 155 141 100 171 141 150 157 157 056 143 157 155|tr \ \\\\) > # Live every life as if it were your last! # $ cat foo A?O $ od -b foo 0000000 101 077 117 012 0000004 octal 101 = A octal 077 = ? octal 077 = O middle char should be capital ñ $ LANG=en_US.ISO-8859-15 tr -d '\000-\177' <foo | od -b 0000000 not quite sure what this does ;-)
From: syd_p on 29 Sep 2009 07:49 On 29 Sep, 10:37, Marcel Bruinsma <m...(a)nomail.afraid.org> wrote: > Am Dienstag, 29. September 2009 10:31, syd_p a écrit : > > > But with LANG=C which I thought was only 7 bits the following > > printfs work just fine. > > > $ printf "(octal 353) is the character \0353\n" > > (octal 353) is the character ë > > printf "(octal 361) is the character \0361\n" > > (octal 361) is the character ñ > > Good, the typeface (font) has the characters you need. > > > These are two of the characters in the MSSQL db which the > > application (not open source) handles as "?". > > Check if the application is really the cause of the problem. > For file 'foo', generated by application, run : > LANG=en_US.ISO-8859-15 tr -d '\000-\177' <foo | od -b > > -- > printf -v email $(echo \ 155 141 162 143 145 154 142 162 165 151 \ > 156 163 155 141 100 171 141 150 157 157 056 143 157 155|tr \ \\\\) > # Live every life as if it were your last! # $ cat foo A?O $ od -b foo 0000000 101 077 117 012 0000004 octal 101 = A octal 077 = ? octal 077 = O middle char should be capital ñ $ LANG=en_US.ISO-8859-15 tr -d '\000-\177' <foo | od -b 0000000 not quite sure what this does ;-)
From: syd_p on 29 Sep 2009 07:53 On 29 Sep, 12:43, syd_p <sydneypue...(a)yahoo.com> wrote: > On 29 Sep, 10:37, Marcel Bruinsma <m...(a)nomail.afraid.org> wrote: > > > Am Dienstag, 29. September 2009 10:31, syd_p a écrit : > > > > But with LANG=C which I thought was only 7 bits the following > > > printfs work just fine. > > > > $ printf "(octal 353) is the character \0353\n" > > > (octal 353) is the character ë > > > printf "(octal 361) is the character \0361\n" > > > (octal 361) is the character ñ > > > Good, the typeface (font) has the characters you need. > > > > These are two of the characters in the MSSQL db which the > > > application (not open source) handles as "?". > > > Check if the application is really the cause of the problem. > > For file 'foo', generated by application, run : > > LANG=en_US.ISO-8859-15 tr -d '\000-\177' <foo | od -b > > > -- > > printf -v email $(echo \ 155 141 162 143 145 154 142 162 165 151 \ > > 156 163 155 141 100 171 141 150 157 157 056 143 157 155|tr \ \\\\) > > # Live every life as if it were your last! # > > $ cat foo > A?O > $ od -b foo > 0000000 101 077 117 012 > 0000004 > octal 101 = A > octal 077 = ? > octal 077 = O > middle char should be capital ñ > > $ LANG=en_US.ISO-8859-15 tr -d '\000-\177' <foo | od -b > 0000000 > not quite sure what this does ;-) Ah yes I am - it deletes all "normal" chars and passes the remainder to od... not quite sure what all zeros as the out means tho... And on a Centos 5.3 box I just invoked $ printf "(octal 353) is the character \0353\n" (octal 353) is the character 3 on the centos 3.8 box I got the expected output of ë
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: Fedora Core 11 Next: e100: eth1: e100_request_firmware: Failed to load firmware "e100/d101m_ucode.bin":-2 |