Enter double byte character in vbscript file

I need to convert → (& rarr) to a character that I can enter into an ANSI VBScript file. I am writing a script that translates the selected set of html codes into their actual characters with two bytes using a regular expression. Many languages ​​do this with "\ 0x8594;" ... which is equivalent in VBScript?

+3
source share
3 answers

The answer was ChrW (8594)

+3
source

ChrW (& H8594)

+1
source

Note: Bob King answer is correct for the information given. The problem is that alumb is mistaken about the meaning of a numeric character entity reference. → (→ single right arrow) is, as stated, also identified as → but this is decimal and so is not equivalent to \x8594 in "many languages" (e.g. C++). This is why chrW(&H8594) gave the "wrong" character. Hexadecimal character entity references are specified using "&#x" instead of "&#". Thus 薔 (薔) = \x8594 = chrW(&H8594) while → (→) = chrW(8594) = \x2192.

+1

Source: https://habr.com/ru/post/1697530/


All Articles