how to modify script to get imdb with encoding in western

If you made a script you can offer it to the others here, or ask help to improve it. You can also report here bugs & problems with existing scripts.
Post Reply
Mike

how to modify script to get imdb with encoding in western

Post by Mike »

how can i modify the imdb script so that it capture the data from imdb in encoding western european (windows) and not in chinese encoding (i am browsing websites with this set as default)
eg Fernán Gómez capture become Fern??n G??mez (??=chinese characters)

thanks.
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

This does not depend of web pages / Internet Explorer settings, but probably from your Windows settings.
In current version accentuated characters are displayed with Windows locale settings.
Next version (4.0) will use unicode under Windows NT/2000/XP, so this problem will be solved (not for Win9x/ME)
Guest

Post by Guest »

thanks for unicode support i really need it
right now i have to open imdb and cut and put from there to antp whenever there is european characters, since my locale is set to chinese
Ork
Posts: 44
Joined: 2003-01-03 23:52:51
Location: Castres, France

Post by Ork »

I have this function in one of my scripts. It converts an Unicode (UTF8) text to Ascii Latin-1, droping all non-translatable characters.

Code: Select all

function UTF8ToAscii(text:string):string;
var
  i:integer;
  c:integer;
  first:integer;
begin
  for i:=1 to length(text) do
  begin
    c:=ord(copy(text,i,1));
    if c>=192 then
      first:=(c-192)*64
    else
    begin
      if c>127 then c:=first+(c-128);
      if c<256 then result:=result+chr(c);
    end;
  end;
end;
mike

Post by mike »

so how do i insert it into IMDB.ifs?
mike

Post by mike »

is there any scripts that is already modify to handle unicode characters?

i have more and more european movies
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Since AMC3 does not support unicode, I do not think that it would be possible to display anything else than Chinese characters (like for European users it is not possible to display Chinese characters).
What you could do is to use the StringReplace function in a script to replace 'é' by 'e' etc. for all accentuated characters in all the fields that may contain them.
mike

Post by mike »

What you could do is to use the StringReplace function in a script to replace 'é' by 'e' etc. for all accentuated characters in all the fields that may contain them
hi,
i do not get a 'é' or any other european characters, i just got a double-byte chinese char in place of the european char.
mike

Post by mike »

PS: I am using English windows 2000 with locale set to chinese as default
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

As I said, it is not possible to display anything else than the locale character set of Windows.
With chinese locale set, the "é" and other "special" character have another meaning than on a Windows configured for US & West-Europe.
What you have is to replace the character that has the value of a "é" by a "e", etc.
The only difficult thing may be to insert the character in the script if Windows does not let you do it.
Even if it is displayed as a chinese character, internally it is the same value than a "é" (followed by another character).
Post Reply