Solved

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

Posted on 2010-11-15
1,254 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

LVL 10

Accepted Solution

TRW-Consulting earned 500 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

### Suggested Solutions

Utilizing an array to gracefully append to a list of EmailAddresses
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…