[Win32utils-devel] PathFindExtension and wide strings

Berger, Daniel Daniel.Berger at qwest.com
Mon Nov 10 17:29:39 EST 2008


What's happening here?

require 'windows/path'
require 'windows/unicode'

include Windows::Path
include Windows::Unicode
file_a = 'bar.txt'
file_w = multi_to_wide(file_a)

p PathFindExtensionA(file_a) # '.txt' => OK
p PathFindExtensionW(file_w) # '.'    => WRONG

Is Ruby chopping the result because of an embedding null? How do we deal
with it?



This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly 
prohibited and may be unlawful.  If you have received this communication 
in error, please immediately notify the sender by reply e-mail and destroy 
all copies of the communication and any attachments.

More information about the win32utils-devel mailing list