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,375 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 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

Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
###### Suggested Courses
Course of the Month13 days, 14 hours left to enroll