Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 11-28-2011, 10:43 AM   #1
gardefjord
Enthusiast
gardefjord began at the beginning.
 
Posts: 28
Karma: 10
Join Date: May 2010
Location: Stockholm
Device: iPhone, iPad, Nook, Bookeen, Sony Reader
Convert Ascii to UTF char

Hi all,
I have html-files with a bunch of ASCII-signs inside. Like so:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="sv">
<head>
<title>De andra</title>
<link rel="stylesheet" href="Styles.css" type="text/css" />
<link rel="stylesheet" type="application/vnd.adobe-page-template+xml" href="page-template.xpgt" />
</head>
<body>
<div class="booksection">
<h1 id="ch001"><a id="page_011"></a>Molly Beslutet</h1>
<p class="noindent_j1">N&#x00E4;r Molly vaknade str&#x00E4;ckte hon ut ena armen mot den andra kudden. Den var lika tom som den varit det senaste halv&#x00E5;ret. Ingen kind att smeka, ingen kropp att krypa intill. Pelle fanns helt enkelt inte d&#x00E4;r.</p>
<p class="indent_j">Hon satte sig upp och sl&#x00E4;ppte ner f&#x00F6;tterna i f&#x00E5;rskinnsf&#x00E4;llen. Den mjuka, lockiga k&#x00E4;nslan fick hennes kropp att l&#x00E5;ngsamt vakna. Hon tog ett par steg fram till f&#x00F6;nstret, &#x00F6;ppnade det och drog f&#x00F6;rsiktigt in den kalla luften i lungorna. &#x00C4;ven om vintern h&#x00F6;ll p&#x00E5; att sl&#x00E4;ppa sitt grepp och det mesta av sn&#x00F6;n hade sm&#x00E4;lt undan var morgnarna fortfarande svartm&#x00E5;lade. Molly huttrade och drog igen f&#x00F6;nstret.</p>
<p class="indent_j">I k&#x00F6;ket sl&#x00E4;ngde hon n&#x00E5;gra vedklampar i spisen och kaminen. Det k&#x00E4;ndes som om hon inte hade gjort n&#x00E5;got annat den sista tiden &#x00E4;n huggit ved och eldat upp den igen.</p>
If anyone knows how i can switch all the ASCII to normal UTF?
&#x00E5;l = å
gardefjord is offline   Reply With Quote
Old 11-28-2011, 12:37 PM   #2
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
In linux, there is a small program called "recode":

recode html..utf8 file.html

(it will also change all &amp;, &lt; and &gt; to &, < and >, though)

I'm sure any decent HTML editor will have an option for that.

By the way, that way of coding characters is not "ascii", but numeric character references.
Jellby is offline   Reply With Quote
Advert
Old 11-28-2011, 12:57 PM   #3
susan_cassidy
Wizard
susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.
 
Posts: 2,251
Karma: 3720310
Join Date: Jan 2009
Location: USA
Device: Kindle, iPad (not used much for reading)
Also called HTML Entities.
susan_cassidy is offline   Reply With Quote
Old 11-28-2011, 01:08 PM   #4
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
You could try Notepad++.
Toxaris is offline   Reply With Quote
Old 11-29-2011, 06:11 AM   #5
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by susan_cassidy View Post
Also called HTML Entities.
Strictly, HTML entities are named, i.e.: &rsquo; vs. &#8217;
Jellby is offline   Reply With Quote
Advert
Old 11-29-2011, 04:32 PM   #6
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,583
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Sigil does this automatically, if you add an .html file to a project. However, it'll also run HTMLTidy and will consolidate style elements, if present.

Last edited by Doitsu; 11-30-2011 at 02:56 AM.
Doitsu is offline   Reply With Quote
Old 12-02-2011, 03:36 AM   #7
gardefjord
Enthusiast
gardefjord began at the beginning.
 
Posts: 28
Karma: 10
Join Date: May 2010
Location: Stockholm
Device: iPhone, iPad, Nook, Bookeen, Sony Reader
Smile

Thanks a lot for all the different answers!
I'm running Oxygen XML so just went Unescape Selection.

But, I'll be sure to refer my colleges to this thread.
gardefjord is offline   Reply With Quote
Reply

Tags
ascii, epub, utf-8


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert Chinese UTF-8 TXT file into ePub?? C.Jones81 Calibre 4 12-05-2010 06:32 AM
Metadata Plugboard - First Char of each word in Series MikeP1212 Calibre 2 10-14-2010 06:14 PM
255 Char limit question jerrywojo Calibre 3 07-10-2010 07:15 PM
50 char limit? BrianG Calibre 2 01-25-2010 10:15 AM


All times are GMT -4. The time now is 11:34 PM.


MobileRead.com is a privately owned, operated and funded community.