VMware {code} Community
entergio
Contributor
Contributor

VixDiskLib_Open : Internationalization (multibyte character)


If I try to call VixDiskLib_Open to a disk that has a path with Chinese characters it cannot find the path.
The VDDK only accepts UTF-8 characters, how do I make it open a path that contains Chinese characters?

On the documentation I read:

"VDDK libraries are not localized, but backup partners can support any locale that uses UTF-8 encoding. Other than Unicode, VDDK does not support multibyte character encodings such as Extended Unix Code (EUC) for Chinese, Japanese, and Korean (ISO- 2022).

The path name to a virtual machine and its VMDK can be expressed with any character set supported by the host file system. As of vSphere 4 and Workstation 7, VMware supports Unicode UTF-8 path names, although for portability to various locales, ASCII-only path names are recommended.

Windows 2000 systems (and later) use UTF-16 for localized path names. For example, in locale FR (Français) the VDDK sample code might mount disk at C: \ Windows \ Temp \ vmware-Système, where è is encoded as UTF-16 so the VixMntapi library cannot recognize it. In this case, a workaround is to set the tmpDirectory configuration key with an ASCII-only path before program start-up; see Initialize the Library.

For programs opening arbitrary path names, Unicode offers a GNU library with C functions iconv_open () to initialize codeset conversion, and iconv () to convert UTF-8 to UTF-16, or UTF-16 to UTF-8. "

 

So the only solution is to make my customers change their virtual machine paths ?
iconv cannot convert EUC to UTF8!
In another post i read that:

"Internationalization support is planned for a future release of VDDK." (05-19-2008 )

but it's been years.

Is there a workaround?

0 Kudos
0 Replies