Welcome Guest ( Log In | Register )


Recommended Addon
sponsored link
Sponsored link

 
Reply to this topicStart new topic
> Chars to escaped unicode conversion with PsPad, (old method rarely needed now)
Goofy
post Apr 16 2008, 09:37
Post #1


Advanced Member
Group Icon

Group: Super Mod
Posts: 8.353
Joined: 30-July 05
From: GoofyLand
Member No.: 13


Extension Developer: Yes
Extensions: BabelZillaMenu-BabelZilla Glossary-OpenTran...
Translator for French (fr)
My OS Gnu/Linux
Translation Credits to Goofy



smile.gif

Let's suppose you problem is to have special chars from your language (diacritic chars and the kind) to be converted into Unicode in order to get a correct displaying.

Of course you can do that manually, but maybe you need some kind of automation.

What you need is

  • PsPad text editor which is win only (sorry) but available in a number of languages for free
  • this conversion fileAttached File  UnicodeEntity.zip ( 703bytes ) Number of downloads: 9
    (unzip please)
then you copy the unicodeentity file in the proper directory
C:\****\Program Files\PSPad\Convert (assuming your hd is c: )

Next, open your document with PsPad and follow the steps in the screenshots smile.gif

Attached File  before.png ( 12.04K ) Number of downloads: 27


Attached File  toolsmenu.png ( 18.11K ) Number of downloads: 24


Attached File  coverter_choice.png ( 20.99K ) Number of downloads: 22


Attached File  after.png ( 11.82K ) Number of downloads: 19


--------------------
Think Global, Make Locales!



You like languages? You should contribute to Tatoeba project!

Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
Go to the top of the page
 
+Quote Post
saster
post Apr 16 2008, 10:07
Post #2


[hu-HU] Moderator
***

Group: BabelZillian Mods
Posts: 155
Joined: 28-July 06
From: Budapest, Hungary
Member No.: 2.018


Extension Developer: Yes
Extensions: mid - mozilla internet dictionary

Translator for Hungarian (hu)
My OS Gnu/Linux



For smaller jobs this link can be very useful, too:

http://people.w3.org/rishida/scripts/univi...%C3%BCrg%C3%A9t

Type your input into the Characters: box, then click Convert.
Attila
Go to the top of the page
 
+Quote Post
DaveG
post Apr 16 2008, 21:46
Post #3


Techie Tricks and Tips provider
Group Icon

Group: Moderator
Posts: 382
Joined: 1-October 07
From: Philadelphia, PA, USA
Member No.: 6.048


Extension Developer: Yes
Extensions: Flagfox, Crash Report Helper
Translator for [No translator]



Here's the little online converter I use for escaping for XML/XUL:
http://konieczny.be/unicode.html

The benefit of this one vs. ishida, which I've also used, is that it only escapes non-ascii and leaves the other characters it doesn't need to escape alone.


--------------------
Flagfox: AMO - WTS - Site - Forum - Changelog - FAQ - Blog
This is not a signature; this is a figment of your imagination...
Go to the top of the page
 
+Quote Post
DaveG
post Apr 18 2008, 10:54
Post #4


Techie Tricks and Tips provider
Group Icon

Group: Moderator
Posts: 382
Joined: 1-October 07
From: Philadelphia, PA, USA
Member No.: 6.048


Extension Developer: Yes
Extensions: Flagfox, Crash Report Helper
Translator for [No translator]



I now present yet another product of Dave's boredom and curiosity:

Unicode to XML escaper in the form of a data URI
(bookmark the page, not the above link; need to use a tinyurl because this forum software hates data URIs)

The page exists soley in its own URL, so once bookmarked you'll have it forever. smile.gif

For those who are curious, here's the data: URI kitchen.


--------------------
Flagfox: AMO - WTS - Site - Forum - Changelog - FAQ - Blog
This is not a signature; this is a figment of your imagination...
Go to the top of the page
 
+Quote Post
Goofy
post Apr 18 2008, 11:02
Post #5


Advanced Member
Group Icon

Group: Super Mod
Posts: 8.353
Joined: 30-July 05
From: GoofyLand
Member No.: 13


Extension Developer: Yes
Extensions: BabelZillaMenu-BabelZilla Glossary-OpenTran...
Translator for French (fr)
My OS Gnu/Linux
Translation Credits to Goofy



QUOTE (DaveG @ Apr 18 2008, 11:54) *
I now present yet another product of Dave's boredom and curiosity:

Unicode to XML escaper in the form of a data URI
(bookmark the page, not the link; need to use a tinyurl because this forum software hates data URIs)

The page exists soley in its own URL, so once bookmarked you'll have it forever. smile.gif

For those who are curious, here's the data: URI kitchen.

unsure.gif uhhh some bit of explanation please.gif (remember we are no geeks here) when I click on your pygmy link I open a beautiful blank page, what should I do next?


--------------------
Think Global, Make Locales!



You like languages? You should contribute to Tatoeba project!

Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
Go to the top of the page
 
+Quote Post
DaveG
post Apr 18 2008, 11:13
Post #6


Techie Tricks and Tips provider
Group Icon

Group: Moderator
Posts: 382
Joined: 1-October 07
From: Philadelphia, PA, USA
Member No.: 6.048


Extension Developer: Yes
Extensions: Flagfox, Crash Report Helper
Translator for [No translator]



QUOTE (Goofy @ Apr 18 2008, 05:02) *
unsure.gif uhhh some bit of explanation please.gif (remember we are no geeks here) when I click on your pygmy link I open a beautiful blank page, what should I do next?

Odd. Works fine for me. You should see a trimmed down version of the konieczny converter with 2 text boxes, buttons, and labels. Paste text in the top, click convert, and it spits it out escaped.

Attached here is the actual file.
Attached File(s)
Attached File  utfxml.html ( 730bytes ) Number of downloads: 5
 


--------------------
Flagfox: AMO - WTS - Site - Forum - Changelog - FAQ - Blog
This is not a signature; this is a figment of your imagination...
Go to the top of the page
 
+Quote Post
Goofy
post Apr 18 2008, 11:29
Post #7


Advanced Member
Group Icon

Group: Super Mod
Posts: 8.353
Joined: 30-July 05
From: GoofyLand
Member No.: 13


Extension Developer: Yes
Extensions: BabelZillaMenu-BabelZilla Glossary-OpenTran...
Translator for French (fr)
My OS Gnu/Linux
Translation Credits to Goofy



smile.gif allright I can see the good job done (from your attached page), running smoothly. Thanks for that rockon.gif

as for the tinyurl, maybe anyone else than the submitter needs a registration or something? (still nothing visible for me)


--------------------
Think Global, Make Locales!



You like languages? You should contribute to Tatoeba project!

Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
Go to the top of the page
 
+Quote Post
DaveG
post Apr 18 2008, 11:47
Post #8


Techie Tricks and Tips provider
Group Icon

Group: Moderator
Posts: 382
Joined: 1-October 07
From: Philadelphia, PA, USA
Member No.: 6.048


Extension Developer: Yes
Extensions: Flagfox, Crash Report Helper
Translator for [No translator]



QUOTE (Goofy @ Apr 18 2008, 05:29) *
as for the tinyurl, maybe anyone else than the submitter needs a registration or something? (still nothing visible for me)

They have no registration of any kind; totally free. Found the problem, and my apologies. It seems that Firefox 3.0 can do that redirect just fine, but Firefox 2.0 can't. I've edited the link in my post to point to the preview page for the tinyurl to work around this. The data URI works fine in both versions; it's just the redirect via tinyurl that has issues. Sorry 'bout that. tongue.gif

And just in case, I should point out that IE doesn't support data URIs at all. IE8 might have some really basic support for really small ones, but that's it.


--------------------
Flagfox: AMO - WTS - Site - Forum - Changelog - FAQ - Blog
This is not a signature; this is a figment of your imagination...
Go to the top of the page
 
+Quote Post
thm
post Mar 5 2009, 10:14
Post #9


Newbie
*

Group: Members
Posts: 2
Joined: 5-March 09
Member No.: 12.111
Extension Developer: No
Translator for [No translator]



Damn man that file is totally useless!!!!

Pspad already have an html safe converter for utf-8 basic special char.

This is what i call a totally useless thread. Found on google and made me only loose lot of time.

DAMN!!!!.

I need a file to convert from chinese, japanese and russian UTF-8 chars to relative html format like this : Š
I repeat that file was totally useless and already present in the PSPAD conversion folder.
Go to the top of the page
 
+Quote Post
thm
post Mar 5 2009, 10:36
Post #10


Newbie
*

Group: Members
Posts: 2
Joined: 5-March 09
Member No.: 12.111
Extension Developer: No
Translator for [No translator]



Sry for this reply to myself

But i solved the problem with a simple Javascript

Paste the following code into an new html file then open the file in your browser.

It will open a page with 2 textarea and a conversion button.
Then onjoy converting every utf-8 char into Я encoding.

Hope thi swill help more then above.

Ua can even use this to create PSD pad conversion files so u can embed conversion files for languages into your version of that editor.


QUOTE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<meta name="generator" content="PSPad editor, www.pspad.com">
<title></title>

<script type="text/javascript">


function toHtml()
{
var src = document.forms[0].from.value;
var dest = '';

for( var i=0; i<src.length; i++)
{
if(src.charCodeAt(i)>127)
dest+= '&#' + src.charCodeAt(i) + ';';
else
dest += src.charAt(i);
}
document.forms[0].to.value = dest;
}


</script>
</head>
<body>


<center>
<form name="converter" action="" onsubmit="return false">

Insert utf8 string<br />
<textarea style="width:80%;height:300px;" name="from" rows="15" cols="15"></textarea><br/>
<button onclick="toHtml()">CONVERT</button>
<hr />
<textarea style="width:80%;height:300px;" name="to" rows="15" cols="15"></textarea>
</form>
</center>
</body>
</html>
Go to the top of the page
 
+Quote Post
DaveG
post Mar 5 2009, 17:16
Post #11


Techie Tricks and Tips provider
Group Icon

Group: Moderator
Posts: 382
Joined: 1-October 07
From: Philadelphia, PA, USA
Member No.: 6.048


Extension Developer: Yes
Extensions: Flagfox, Crash Report Helper
Translator for [No translator]



thm: Calm down. I don't quite know what you're going on about here, but there's 3 separate JavaScript based converters in this thread. Please read the whole thread before complaining. If what you're saying is that the PsPad instructions in the first post are out of date, and that it has a converter file included with it now, then good for you. This thread is a year old, ya know.


--------------------
Flagfox: AMO - WTS - Site - Forum - Changelog - FAQ - Blog
This is not a signature; this is a figment of your imagination...
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 26th May 2013 - 04:37
Bridged By IpbWiki: Integration Of Invision Power Board and MediaWiki © GlobalSoft