Heaventools

   English English  Deutsch Deutsch  Русский Русский
Heaventools Support Forums
May 17, 2012, 03:08:33 am *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Unicode Support  (Read 2640 times)
0 Members and 1 Guest are viewing this topic.
steffen.haugk
New Member
*
Posts: 5

Location:
england

Offline Offline



« on: November 13, 2008, 08:31:49 am »

Hi there,
Resource Tuner Console fully supports Unicode! That is great news. However I can't get my script to be accepted by rtc. Does anyone know what encoding to use? I tried allsorts, including w/o BOM (as notepad always writes a BOM), but to no avail.

What am I doing wrong?

Cheers, Steffen
TechMan
Heaventools
Support
***
Posts: 220

Location:
On Air

Offline Offline



« Reply #1 on: November 13, 2008, 09:41:51 am »

Ironically, RTC can only read ASCII scripts since it has no access to ANSI/Unicode converting operations inside Windows Scripting Host.

If the computer will have all of the relevant languages installed and you write it out in the relevant windows code page instead, this might work out.

Perhaps you can use external text files for defining the path/filenames.

TechMan Robot
Heaventools Software
steffen.haugk
New Member
*
Posts: 5

Location:
england

Offline Offline



« Reply #2 on: November 14, 2008, 04:35:45 am »

Why is that? I don't know much about WSH, but I did a little vbs to test Unicode support of WSH. The files is called C:\北京歡迎你\何日君再来.vbs (Unicode characters can not be shown here it seems) and contains the following short code:

CODE
myPath = "c:\北京歡迎你\"
Set objShell = CreateObject ("Shell.Application")
Set objFolder = objShell.Namespace (myPath)
Set objFSO = CreateObject("Scripting.FileSystemObject")
Dim Headers(13)
For i = 0 to 13
    Headers(i) = objFolder.GetDetailsOf (objFolder.Items, i)
Next
For Each strFileName in objFolder.Items
    Lines = "Path: " & myPath
    For i = 0 to 13
            Lines = Lines & vbCr & Headers(i) & ": " & objFolder.GetDetailsOf (strFileName, i)
    Next
    Wscript.Echo Lines
Next


I saved the script in UTF16LE w/BOM.

Since there is only one file in this folder, the output is only one msgbox. The info in there, including title, author etc. is all pretty much Unicode. (would have attached a screen shot but don't know how)

At the very least, the UTF16 script can find a file in a Unicode path, which is all I want.

I must admit I don't know how rtc uses WSH, but WSH seems to have no issue with Unicode.

To your last remark, how can I use external files to define paths/filenames? All I am doing is replacing icons.

Thanks for the quick reply.

Cheers, [me][/me]
TechMan
Heaventools
Support
***
Posts: 220

Location:
On Air

Offline Offline



« Reply #3 on: November 14, 2008, 03:02:24 pm »

WSH has no issue with Unicode pathnames, and yet the RTC scripting engine has. We are aware of this problem and working towards a resolution.

Of course, life would be much easier if developers didn't use Unicode pathnames, or at least if they renamed them before  processing. But I'm just a robot, I'm not qualified to give any meaningful answer that would be of help.

TechMan Robot
Heaventools Software
steffen.haugk
New Member
*
Posts: 5

Location:
england

Offline Offline



« Reply #4 on: November 14, 2008, 09:41:05 pm »

I agree life would be easier, however the choice of pathnames is out of my hands. If our customers wish to name an executable something in their language, who can blame them? After all, we are doing it. You are doing it. If they include a file called 'readme.txt', their customers might not know what that is. 'readme' might have an equivalent in their language, and our customers may wish to use that name. Similar thing with licence.txt etc.

I guess in the meantime we will tell our customers to not use their language for pathnames and stuff. I am sure they are used to that.

Giving a meaningful aswer is the easy bit for a robot, it's the sense of humour that is so hard to implement. But they did a good job with you. Cheer up, Marvin, you're doing well. ':blush:'

Thanks once again for the quick reply.
Cheers, Steffen
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF | SMF © 2006-2009, Simple Machines LLC