InitializeICUDefaultLocation path string representation.

98 views
Skip to first unread message

Jim Acquavella

unread,
Sep 6, 2018, 7:41:22 PM9/6/18
to v8-users
Is this api expecting a utf8 string or ansi?


bool v8::V8::InitializeICUDefaultLocation(const char * exec_path,
const char * icu_data_file = nullptr 
)


It would be sort of ironic if the exec path for setting up the ICU location wasn't unicode!  But, it does seem to handle multibyte paths ok, but not unicode. -Jim

Jim Acquavella

unread,
Oct 1, 2018, 11:54:16 AM10/1/18
to v8-users
This is definitely a problem.  Are any other applications that use this API able to run their application if the path has non-ASCII characters?  These paths should use UTF-8 string representations and communicate with the OS accordingly.  Can anyone suggest a work around to this problem? 


--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to a topic in the Google Groups "v8-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/v8-users/m_VNgpzh4S4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to v8-users+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ben Noordhuis

unread,
Oct 2, 2018, 7:11:51 AM10/2/18
to v8-users
On Fri, Sep 7, 2018 at 1:41 AM Jim Acquavella <loude...@gmail.com> wrote:
> Is this api expecting a utf8 string or ansi?
>
> bool v8::V8::InitializeICUDefaultLocation(const char * exec_path,
> const char * icu_data_file = nullptr
> )
>
> It would be sort of ironic if the exec path for setting up the ICU location wasn't unicode! But, it does seem to handle multibyte paths ok, but not unicode. -Jim

It calls LoadLibraryA() on Windows, fopen() on other platforms. I
expect most embedders bundle ICU and V8 together and never deal with
file paths in the first place.

Jim Acquavella

unread,
Oct 2, 2018, 2:27:14 PM10/2/18
to v8-users
Yeah, I can avoid this by placing the icu file next to my executable.  In the future, this should definitely use LoadLibraryW.

Thanks.

Reply all
Reply to author
Forward
0 new messages