Solved

# html2latex rendering quotes as <93><94> and \223 \224 in vim/emacs... what's goning on?

Posted on 2010-11-15
Medium Priority
1,335 Views
OS = Linux

I have documents that I am converting from HTML to LaTeX. The produced LaTeX file has some strange characters for the double quotes and quotes.

When viewed in vim the double quotes show up as:
<93> for the open quotes
<94> for the close quotes

when viewed in emacs the double quotes show up as:
\223  for the open quotes
\224  for the close quotes

My problem is that I am importing them into LyX (a LaTeX document processor) and LyX is converting both to closed quotes.  I was going to sed the document and change the strings and post process them later, but they are not recognized by sed.

What kind of characters are these?

$grep -e '\223' file.tex grep: Invalid back reference$ sed -e 's/\223/TAG233TAG/g' file.tex
sed: -e expression #1, char 18: Invalid back reference

for <93> and <94>:

sed produces no output:
$sed -e 's/<93>/TAG233TAG/g' file.tex |grep TAG cat just shows a "?" in a diamond when it encounters single or double quotes.$ cat file.tex
text text text {\it ¿quoted text.¿} I don¿t know what is going on.

I am hoping to find a way to convert these, but don't know what kind of characters these are.

Thanks,
Frank
0
Question by:ibanja
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 10

Accepted Solution

TRW-Consulting earned 2000 total points
ID: 34142836
Sounds like the files were copied from a file that used an extended character set, like CP-1252.

The \223 (hex 93) and \224 (hex 94) are octal for the extended characters 'left double quote' and 'right double quote'

You could run the files through a filter to translate them to regular double-quotes like this:

cat filename | tr '[\223\224]' '"' >newfilename
0

Author Closing Comment

ID: 34145337
Thanks! i never knew about the "tr" command.

That did the trick.
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question