Page 1 of 1

how to modify script to get imdb with encoding in western

Posted: 2003-07-30 08:51:20
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.

Posted: 2003-07-31 14:49:47
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)

Posted: 2003-08-04 03:36:41
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

Posted: 2003-08-25 22:25:43
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;

Posted: 2003-12-23 00:36:46
by mike
so how do i insert it into IMDB.ifs?

Posted: 2004-03-28 18:14:21
by mike
is there any scripts that is already modify to handle unicode characters?

i have more and more european movies

Posted: 2004-03-28 18:52:13
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.

Posted: 2004-05-28 18:51:48
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.

Posted: 2004-05-28 18:54:47
by mike
PS: I am using English windows 2000 with locale set to chinese as default

Posted: 2004-05-28 20:43:44
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).