how to escape special characters

News and discussion about development of the Debian OS itself

how to escape special characters

Postby gauri » 2005-12-14 15:50

hi,

I am having a text file which contain the many lines like as follow:

*%EFILocal [print status:Estado de impresi\x97n]

when i try to edit uing vi editor and just move my left arrow key i found that after i in impresi it overlook \x9 and reach to 7.

Also when i cat that file it does not show me that \x97n. Rather it shows as

*%EFILocal [print status:Estado de impresi\x97n]

Thanks in advance
Gauri


I want to know why is this happening. If it is a special character, then how can i escape it.

Thanks & Regards
Gauri
gauri
 

Postby Jeroen » 2005-12-18 03:03

Looks like a character set and/or locale problem. Can you please put up the file somewhere so that people can look it it? What does 'locale' say on your system?

It's just plain text, you cannot 'escape' it -- you 'just' need to configure your system locale correctly in order to have the file shown correctly with cat -- and that will only work with X, not in the console, because the console typically doesn't have any non-ascii support (unless you have framebuffer).

Also see "dpkg-reconfigure locales", if you want to select what locales exist, and if you use gdm, choose a correct locale with charset support from the language menu, rather than "C" or "POSIX".
Jeroen
Debian Developer, Site Admin
Debian Developer, Site Admin
 
Posts: 571
Joined: 2004-04-06 18:19
Location: Utrecht, NL


Return to Debian Development

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable