Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 11-28-2011, 11: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, 01: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: 6,316
Karma: 4963983
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
 
Advertisement
Old 11-28-2011, 01: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: 1,956
Karma: 1726558
Join Date: Jan 2009
Device: Kindle, iPad (not used much for reading)
Also called HTML Entities.
susan_cassidy is offline   Reply With Quote
Old 11-28-2011, 02: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: 3,183
Karma: 7180223
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
You could try Notepad++.
Toxaris is offline   Reply With Quote
Old 11-29-2011, 07: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: 6,316
Karma: 4963983
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
Old 11-29-2011, 05:32 PM   #6
Doitsu
Wizard
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: 2,132
Karma: 4938208
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 03:56 AM.
Doitsu is offline   Reply With Quote
Old 12-02-2011, 04: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

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 07:32 AM
Metadata Plugboard - First Char of each word in Series MikeP1212 Calibre 2 10-14-2010 07:14 PM
255 Char limit question jerrywojo Calibre 3 07-10-2010 08:15 PM
50 char limit? BrianG Calibre 2 01-25-2010 11:15 AM


All times are GMT -4. The time now is 05:01 PM.


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