Solved

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

Posted on 2010-11-15
2
1,240 Views
Last Modified: 2012-06-27
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
Comment
Question by:ibanja
2 Comments
 
LVL 10

Accepted Solution

by:
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

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

That did the trick.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now