Solved

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

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

Find out what you should include to make the best professional email signature for your organization.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…