If every other character is \0, then you probably have a UTF16 string or (at least what Microsoft calls) a Unicode string.
The only problem with just stripping the '\0's is that non-ASCII characters aren't going to be translated properly. Searching on "Unicode" or "wide characters" should find you more information to help you decide how you want to deal with these.
Recent versions of Perl have some Unicode support (though it is still probably considered "experimental") so you could tell Perl that the string you got was Unicode and then most operations would work (for example, you could compare the string to a non-Unicode string and Perl would convert one of the strings before comparing.
- tye (but my friends call me "Tye")In reply to (tye)Re: DBI returns NULL characters in string
by tye
in thread DBI returns NULL characters in string
by jcbyrne
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |