Unicode delimiter vb6

vb62022

New Member
Joined
Jul 18, 2022
Messages
7
Office Version
  1. 2003 or older
Hello everyone, although is not visual basic 6 forum here, i am sure i can find solution for my problem. I saw similar thread there, but for some reason that method doesnt work for me(maybe im doing something wrong im not sure).

It's about that i wrote data arrays at the end of the exe with delimiter. After I compiled, the app it didn't work on Chinese Windows, only on English, I want to configure the app to work on Chinese windows as well, I know it will work if I change the system location, but that's not what I want. I want it to work without changing the system location, as far as i understand the delimiter function should be unicode delimited.
The project is coded in vb6, so i still trying to find solution.

Im pasting example of the code.




Dim MyData() As String
MyData() = Split(info, "DELIMITER") 'Note I was try it MyData() = Split(info, ChrW(&H60C)) but it still does not work.

As i said i saw this similar thread, but it does not work for me.
Here is the link.

 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Are you sure that this code is right?
I think there should be 4 characters after the &H

Another method would be:
Find the Unicode number which describes your desired character and copy it between Chr( and )
Check the VB documentation for more info.

Thank you for your answer, actually i am not sure if the code is right, cause i am trying to help to a friend of mine.

I followed the link that u sent me, but i still get error.
 
Upvote 0
I am sorry for the double post, but why do u think there must be 4 character?
 
Upvote 0
Unicode and VBA’s ChrW() and AscW() functions – Daily Dose of Excel
ChrW() expects a long as input, but also accepts hexadecimal. Unicode is in hex numbering, so there are two choices: Change U2032 to decimal, or tell ChrW() that the input is in Hex. Since HEX2DEC(2032) is 8242, these two are equivalent:

  • ChrW(8242)
  • ChrW(&H2032)
The H in ChrW(&H60C) stands for "HEX" that is a hexadecimal value and after the "H" there will be 4 digits of information on the Unicode Character.

Decimal: 0, 1, 2, 3, ..., 9 (10 digits)
Hexadecimal: 0, 1, 2, 3, ... 9, A, B, C, D, E, F (16 digits)
 
Upvote 0
Solution
Unicode and VBA’s ChrW() and AscW() functions – Daily Dose of Excel

The H in ChrW(&H60C) stands for "HEX" that is a hexadecimal value and after the "H" there will be 4 digits of information on the Unicode Character.

Decimal: 0, 1, 2, 3, ..., 9 (10 digits)
Hexadecimal: 0, 1, 2, 3, ... 9, A, B, C, D, E, F (16 digits)
Thank you Peter for your answer, and I am sorry for my late reply. I got it that part with the delimiter, but I found out, that he use:

StrConv vbFromUnicode to convert him data.

Do you think, when he use Unicode delimiter, instead "vbFromUnicode" must be use "vbUnicode"

In this case, instead - Some code, StrConv(sData(1), vbFromUnicode) Must use Some code, StrConv(sData(1), vbUnicode)
 
Upvote 0
P.S It's seems there's no way to work, but thank you for your answers Peter!
 
Upvote 0
P.S It's seems there's no way to work, but thank you for your answers Peter!
I suspect there probably is a way of getting it to work, but I query whether you're referencing the right Unicode character. &H60C = 1548, and if you look at the other unicode characters in that set, you get:

1658839504698.png


Those are not Chinese characters.

The CJK Chinese character table in Unicode does begin until &H4E00, which is 19968.

1658839803575.png
 
Upvote 0
I suspect there probably is a way of getting it to work, but I query whether you're referencing the right Unicode character. &H60C = 1548, and if you look at the other unicode characters in that set, you get:

View attachment 70128

Those are not Chinese characters.

The CJK Chinese character table in Unicode does begin until &H4E00, which is 19968.

View attachment 70130
Thank you Dan, for your answer, its work now, but it's still only on English Windows, i suspect the problem is somewhere else, maybe strconv or the encryption. I am still trying to find a solution.
 
Upvote 0
Thank you Dan, for your answer, its work now, but it's still only on English Windows, i suspect the problem is somewhere else, maybe strconv or the encryption. I am still trying to find a solution.
When doesn't it work? Do you have code we can review?
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top