Chars to translate

If you need help on how to use the program
Post Reply
fulvio53s03
Posts: 765
Joined: 2007-04-28 05:46:43
Location: Italy

Chars to translate

Post by fulvio53s03 »

Creating a script to extract info from a Comic's site (page: https://www.comicsbox.it/albo/tex_701 and similars) I find some characters that need to be translated such as ( ” ------> .
Please, Is there any function to do it? :??:
Thanks! :cry:

new.
chars code looks to be CP895. Could anyone write a procedure to translate (as like from CP1252)?
antp
Site Admin
Posts: 9664
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: Chars to translate

Post by antp »

This is not a character set, it is just HTML entities.
Many are decoded by the HTMLDecode function, this one included.
fulvio53s03
Posts: 765
Joined: 2007-04-28 05:46:43
Location: Italy

Re: Chars to translate

Post by fulvio53s03 »

antp wrote: 2023-04-26 06:06:57 This is not a character set, it is just HTML entities.
Many are decoded by the HTMLDecode function, this one included.
Very useful to know and some problems are now solved. There are still some chars non translated and I don't know how to do.
If you take a look to https://www.comicsbox.it/albo/tex_704 and you find 'tracce…'
you can see some of them.
:??:
antp
Site Admin
Posts: 9664
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: Chars to translate

Post by antp »

What do you mean by "not translated"? That one is directly like that in the page, not as HTML entity. Is it wrongly displayed in AMC?
fulvio53s03
Posts: 765
Joined: 2007-04-28 05:46:43
Location: Italy

Re: Chars to translate

Post by fulvio53s03 »

antp wrote: 2023-04-29 08:09:46 Is it wrongly displayed in AMC?
Yes, ... may be there is a problem in my scritp?
Can I send it to you?
:innocent:

EDIT: resolved!
Pagestr := SharedUTF8ToCP1252Decode(Pagestr);
Pagestr := StringReplace(Pagestr, 'â?¦', '...');
:innocent: :up:
antp
Site Admin
Posts: 9664
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: Chars to translate

Post by antp »

It is strange that it was not decoded by UTF8Decode... or you just use your custom decode functions?
fulvio53s03
Posts: 765
Joined: 2007-04-28 05:46:43
Location: Italy

Re: Chars to translate

Post by fulvio53s03 »

antp wrote: 2023-05-02 13:47:07 It is strange that it was not decoded by UTF8Decode... or you just use your custom decode functions?
Here viewtopic.php?t=39721 you can find a solution by MrObama.
:grinking:
Post Reply