Author Topic: Dynamic SQL error when the title is Chinese  (Read 12053 times)

0 Members and 1 Guest are viewing this topic.

Offline itforay

  • Member
  • *
  • Posts: 19
    • View Profile
Dynamic SQL error when the title is Chinese
« on: August 22, 2009, 06:51:56 am »
Hi! The same problem with bellow post.
http://www.videodb.info/forum_en/index.php?topic=950.0

Some of Chinese title are ok, but others are not.
For example: 锅盖头


PS: If i use New Movie, it can work correctly. But if i use New Movie Master the problem will be show.
« Last Edit: August 22, 2009, 02:50:25 pm by itforay »

Offline nostra

  • Administrator
  • *****
  • Posts: 2852
    • View Profile
    • Personal Video Database
Re: Dynamic SQL error when the title is Chinese
« Reply #1 on: August 28, 2009, 01:22:00 am »
Could you please provide me with a number of real examples of Chinese titles?
Gentlemen, you can’t fight in here! This is the War Room!

Offline itforay

  • Member
  • *
  • Posts: 19
    • View Profile
Re: Dynamic SQL error when the title is Chinese
« Reply #2 on: August 28, 2009, 02:39:39 am »
for example:
just one character 恶
3 characters 锅盖头 中国字 打广告
5 characters 魔力女战士

i test several title, it is so strange!
even count characters is ok, but odd count characters will raise SQL Error.

I Google some similar problems, it actually exists.You program with C++?
http://www.qqgb.com/Program/VC/VCJQ/Program_176134.html

This is a short explain. it is coding problem, CString to Unicode.
if the title is even count characters, so the bytes are even count, then it can be transformed to Wchar correctly.
but for odd count, the bytes are odd count, so it can not be transformed to Wchar correctly.

I hope this can help solve the problem.

    WCHAR uData[] = L"I服了you!";
    char * buffer;
    int nLength = 0;

    nLength = WideCharToMultiByte(CP_ACP,NULL,uData,-1,NULL,0,NULL,NULL);
    buffer = (char*)malloc(nLength);
    WideCharToMultiByte(CP_ACP,NULL,uData,-1,buffer,nLength,NULL,NULL);
    MessageBox(buffer);
    free(buffer);

Offline nostra

  • Administrator
  • *****
  • Posts: 2852
    • View Profile
    • Personal Video Database
Re: Dynamic SQL error when the title is Chinese
« Reply #3 on: August 28, 2009, 10:46:55 am »
Thanks for the info. I am programming with Delphi, but the problem could be similar to the one in C++. I will check this right away.
Gentlemen, you can’t fight in here! This is the War Room!

Offline itforay

  • Member
  • *
  • Posts: 19
    • View Profile
Re: Dynamic SQL error when the title is Chinese
« Reply #4 on: August 28, 2009, 12:53:21 pm »
BTW. This problem just raise when I use New Movie Master.
I can modify the title to Chinese, the program will accept, no error raised.
Thank you. ;)

Offline nostra

  • Administrator
  • *****
  • Posts: 2852
    • View Profile
    • Personal Video Database
Re: Dynamic SQL error when the title is Chinese
« Reply #5 on: August 30, 2009, 10:29:57 pm »
Sorry, but I am still unable to reproduce the problem (and it is very important to find where the bug is) :(

Could you start PVD with -debug command line parameter, reproduce the problem and the copy the contents of the Help -> Log window to the forum?
Gentlemen, you can’t fight in here! This is the War Room!

Offline itforay

  • Member
  • *
  • Posts: 19
    • View Profile
Re: Dynamic SQL error when the title is Chinese
« Reply #6 on: August 31, 2009, 12:42:51 am »


(2009-8-31 7:35:03) PVD Version: 0.9.9.11
(2009-8-31 7:35:03) OS: Windows XP or .NET server (Build 2600: Service Pack 2)
(2009-8-31 7:35:03) Plugin loaded: allcdcovers.dll 0.1.0.4
(2009-8-31 7:35:03) Plugin loaded: amazon.dll 0.4.3.5
(2009-8-31 7:35:03) Plugin loaded: amazonde.dll 0.1.1.5
(2009-8-31 7:35:03) Plugin loaded: amazonuk.dll 0.1.0.2
(2009-8-31 7:35:03) Plugin loaded: amc.dll 0.3.1.0
(2009-8-31 7:35:03) Plugin loaded: animenfo.dll 0.1.0.2
(2009-8-31 7:35:03) Plugin loaded: csvimp.dll 0.1.2.0
(2009-8-31 7:35:03) Plugin loaded: faffes.dll 0.2.4.2
(2009-8-31 7:35:03) Plugin loaded: filmup.dll 0.1.1.2
(2009-8-31 7:35:03) Plugin loaded: filmup_people.dll 0.1.1.3
(2009-8-31 7:35:03) Plugin loaded: filmup_poster.dll 0.1.1.2
(2009-8-31 7:35:03) Plugin loaded: imdb.dll 0.9.1.1
(2009-8-31 7:35:03) Plugin loaded: imdb_people.dll 0.2.2.0
(2009-8-31 7:35:03) Plugin loaded: impawards.dll 0.1.4.0
(2009-8-31 7:35:03) Plugin loaded: moviemeter.dll 0.1.3.6
(2009-8-31 7:35:03) Plugin loaded: msexcel.dll 0.4.0.0
(2009-8-31 7:35:03) Plugin loaded: ofdb.dll 0.4.1.0
(2009-8-31 7:35:03) Plugin loaded: ofdb_people.dll 0.1.1.4
(2009-8-31 7:35:03) Plugin loaded: plainexp.dll 0.6.0.0
(2009-8-31 7:35:03) Plugin loaded: pvdtotray.dll 0.1.0.1
(2009-8-31 7:35:03) Plugin loaded: scriptint.dll 0.2.4.0
(2009-8-31 7:35:03) Plugin loaded: tvdb.dll 0.1.0.1
(2009-8-31 7:35:03) Plugin loaded: twittpvd.dll 0.1.0.0
(2009-8-31 7:35:03) Compiling script: adultdvdempire.psf
(2009-8-31 7:35:03) Script compiled successfully: adultdvdempire.psf
(2009-8-31 7:35:03) Executing script binary
(2009-8-31 7:35:03) Compiling script: allmovie.psf
(2009-8-31 7:35:03) Script compiled successfully: allmovie.psf
(2009-8-31 7:35:03) Executing script binary
(2009-8-31 7:35:03) Compiling script: animator.ru.psf
(2009-8-31 7:35:03) Script compiled successfully: animator.ru.psf
[Hint] (313:3): Variable 'DIGITS' never used
[Hint] (446:3): Variable 'SELECTEDURL' never used
[Hint] (447:3): Variable 'POS2' never used
[Hint] (447:3): Variable 'I' never used
[Warning] (551:16): "True and" is not needed
[Warning] (582:15): Calculation always evaluates to True
[Warning] (615:15): Calculation always evaluates to True
[Hint] (545:3): Variable 'FILMTYPE' never used
[Hint] (545:3): Variable 'ACTORS' never used
[Hint] (545:3): Variable 'CREATORS' never used
[Hint] (547:3): Variable 'POS2' never used
[Hint] (547:3): Variable 'LEN' never used
(2009-8-31 7:35:03) Executing script binary
(2009-8-31 7:35:03) Compiling script: anime.psf
(2009-8-31 7:35:03) Script compiled successfully: anime.psf
[Hint] (189:2): Variable 'CURPOS' never used
[Hint] (189:2): Variable 'ENDPOS' never used
[Hint] (190:2): Variable 'NAME' never used
[Hint] (190:2): Variable 'URL' never used
(2009-8-31 7:35:03) Executing script binary
(2009-8-31 7:35:03) Compiling script: beyazperde.psf
(2009-8-31 7:35:03) Script compiled successfully: beyazperde.psf
(2009-8-31 7:35:03) Executing script binary
(2009-8-31 7:35:03) Compiling script: kino-teatr.ru.psf
(2009-8-31 7:35:03) Script compiled successfully: kino-teatr.ru.psf
(2009-8-31 7:35:03) Executing script binary
(2009-8-31 7:35:03) Compiling script: kinopoisk.psf
(2009-8-31 7:35:03) Script compiled successfully: kinopoisk.psf
[Hint] (2233:2): Variable 'ITEMS' never used
(2009-8-31 7:35:03) Executing script binary
(2009-8-31 7:35:03) Compiling script: kinopoisk_person.psf
(2009-8-31 7:35:03) Script compiled successfully: kinopoisk_person.psf
(2009-8-31 7:35:03) Executing script binary
(2009-8-31 7:35:03) Compiling script: kinopoisk_poster.psf
(2009-8-31 7:35:03) Script compiled successfully: kinopoisk_poster.psf
(2009-8-31 7:35:03) Executing script binary
(2009-8-31 7:35:03) Compiling script: txtinfo_en.psf
(2009-8-31 7:35:03) Script compiled successfully: txtinfo_en.psf
(2009-8-31 7:35:03) Executing script binary
(2009-8-31 7:35:03) Compiling script: txtinfo_ru.psf
(2009-8-31 7:35:03) Script compiled successfully: txtinfo_ru.psf
(2009-8-31 7:35:03) Executing script binary
(2009-8-31 7:35:03) Compiling script: worldart.psf
(2009-8-31 7:35:03) Script compiled successfully: worldart.psf
(2009-8-31 7:35:03) Executing script binary
(2009-8-31 7:35:03) Compiling script: worldart_person.psf
(2009-8-31 7:35:03) Script compiled successfully: worldart_person.psf
(2009-8-31 7:35:03) Executing script binary
(2009-8-31 7:35:03) Compiling script: zelluloid.psf
(2009-8-31 7:35:04) Script compiled successfully: zelluloid.psf
(2009-8-31 7:35:04) Executing script binary
(2009-8-31 7:35:04) Script loaded: adultdvdempire.psf 0.1.0.5
(2009-8-31 7:35:04) Script loaded: allmovie.psf 0.1.0.4
(2009-8-31 7:35:04) Script loaded: animator.ru.psf 0.1.0.0
(2009-8-31 7:35:04) Script loaded: anime.psf 0.1.0.0
(2009-8-31 7:35:04) Script loaded: beyazperde.psf 0.1.0.0
(2009-8-31 7:35:04) Script loaded: kino-teatr.ru.psf 0.0.0.1
(2009-8-31 7:35:04) Script loaded: kinopoisk.psf 1.0.7.0
(2009-8-31 7:35:04) Script loaded: kinopoisk_person.psf 0.1.0.3
(2009-8-31 7:35:04) Script loaded: kinopoisk_poster.psf 0.2.1.0
(2009-8-31 7:35:04) Script loaded: txtinfo_en.psf 0.1.0.0
(2009-8-31 7:35:04) Script loaded:  [RU] 椤瑰楹掕灟 妗х簺鐥ㄥ湁妫??缈虫湨鎴?妗?铦堢姛铦惧扛娉?缇挎
(2009-8-31 7:35:04) Loading database: E:\My Documents\Personal Video Database\movies.pvd


The Dynamic SQL error is not logged.

Offline nostra

  • Administrator
  • *****
  • Posts: 2852
    • View Profile
    • Personal Video Database
Re: Dynamic SQL error when the title is Chinese
« Reply #7 on: August 31, 2009, 12:56:25 am »
What are your regional settings in windows?
Gentlemen, you can’t fight in here! This is the War Room!

Offline dee2000

  • Member
  • *
  • Posts: 3
    • View Profile
Re: Dynamic SQL error when the title is Chinese
« Reply #8 on: December 05, 2009, 08:25:57 pm »
Hi,
Just started using PVD with latest build and seeing the same problem when adding movie in chinese title (chinese folder name and chinese file name). Just curious if there's a fix to this issue?  Thank you

Offline nostra

  • Administrator
  • *****
  • Posts: 2852
    • View Profile
    • Personal Video Database
Re: Dynamic SQL error when the title is Chinese
« Reply #9 on: December 05, 2009, 09:19:28 pm »
I could not still figure out what exactly the problem is. Could you post your regional settings here? What Windows version are you using?
Gentlemen, you can’t fight in here! This is the War Room!

Offline dee2000

  • Member
  • *
  • Posts: 3
    • View Profile
Re: Dynamic SQL error when the title is Chinese
« Reply #10 on: December 06, 2009, 08:45:07 pm »
Thanks for the quick reply. I did some test last night and able to determine it only happen with certain chinese word in movie name.
for example: the following name worked: 白银帝国, 絕命派对,  荒村客栈
The following name got error: 阴阳师, 魔术男, 親愛的
I am guessing it's certain word is causing the error. I am running Vista with default regional setting. I did not do anything extra in the regional setting. Again, 70% of the movies with chinese letter added fine, just some that get the error.
Thank you.