How to change string codification from chinese to

2020-05-08 07:27发布

问题:

I need to get a path from two different machine/pc, one of them is with English environment and the other with Chinese environment.

I have a project into our database with this name: Defaults侇侚

If I open my database the name is display like this:

Is the last one.

My problem is, when I'm going on the English machine/pc I receive in my application this String: "c:\Restore\20190213140908\Defaults" & ChrW(129) & "î" & ChrW(129) & "ù\Defaults" & ChrW(129) & "î" & ChrW(129) & "ù" Everything is ok, my function return true.

But when I'm going on the Chinese machine/pc I receive this type of string:"c:\Restore\20190213142118\Defaults侇侚\Defaults侇侚" and my function doesn't work.

My question is how it's posible to convert this string:

"c:\Restore\20190213142118\Defaults侇侚\Defaults侇侚"

to

"c:\Restore\20190213140908\Defaults" & ChrW(129) & "î" & ChrW(129) & "ù\Defaults" & ChrW(129) & "î" & ChrW(129) & "ù"

Note: For this database is not possible to change the unicode.

标签: vb.net oracle