Re: [v8-users] InitializeICUDefaultLocation path string representation.

2018-10-02 Thread Jim Acquavella
Yeah, I can avoid this by placing the icu file next to my executable.  In
the future, this should definitely use LoadLibraryW.

Thanks.

On Tue, Oct 2, 2018 at 4:11 AM Ben Noordhuis  wrote:

> On Fri, Sep 7, 2018 at 1:41 AM Jim Acquavella 
> 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.
>
> --
> --
> v8-users mailing list
> v8-users@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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] InitializeICUDefaultLocation path string representation.

2018-10-02 Thread Ben Noordhuis
On Fri, Sep 7, 2018 at 1:41 AM Jim Acquavella  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.

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] InitializeICUDefaultLocation path string representation.

2018-10-01 Thread Jim Acquavella
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?


On Thu, Sep 6, 2018 at 4:41 PM Jim Acquavella  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
>
> --
> --
> v8-users mailing list
> v8-users@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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[v8-users] InitializeICUDefaultLocation path string representation.

2018-09-06 Thread Jim Acquavella
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

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] InitializeICUDefaultLocation

2018-05-26 Thread Joe Smack
I just cant get it to work. :/ I wish I could get some visual studio files 
to see how everything is set up.

On Saturday, May 26, 2018 at 2:14:13 AM UTC-7, Ben Noordhuis wrote:
>
> On Sat, May 26, 2018 at 11:03 AM, Joe Smack  > wrote: 
> > What is the proper way to do this function? I just can't get it to work. 
> > 
> > My code: 
> > const char * exec_path = "C:\\Users\\Joe Smack\\Documents\\Visual Studio 
> > 2017\\Projects\\v8 console test\\v8 console test"; 
> > const char * icu_data_file = "icudtl.dat"; 
> > V8::InitializeICUDefaultLocation(exec_path, icu_data_file); 
> > 
> > This code is giving me an exception in the function InitializeICU 
> (called 
> > from InitializeICUDefaultLocation) when it gets to FILE* inf = 
> > fopen(icu_data_file, "rb"); (line 95) 
> > The debugger says icu_data_file = icudtl.dat 
> > 
> > i copied icudtl.dat to the project directory from v8 directory. Any help 
> is 
> > greatly appreciated. 
>
> You can pass nullptr as the second argument and V8 will look for 
> icudtl.dat relative to the executable. 
>
> If you pass in a file path, it should be either absolute or relative 
> to the current working directory (_not_ the executable.) 
>

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [v8-users] InitializeICUDefaultLocation

2018-05-26 Thread Ben Noordhuis
On Sat, May 26, 2018 at 11:03 AM, Joe Smack  wrote:
> What is the proper way to do this function? I just can't get it to work.
>
> My code:
> const char * exec_path = "C:\\Users\\Joe Smack\\Documents\\Visual Studio
> 2017\\Projects\\v8 console test\\v8 console test";
> const char * icu_data_file = "icudtl.dat";
> V8::InitializeICUDefaultLocation(exec_path, icu_data_file);
>
> This code is giving me an exception in the function InitializeICU (called
> from InitializeICUDefaultLocation) when it gets to FILE* inf =
> fopen(icu_data_file, "rb"); (line 95)
> The debugger says icu_data_file = icudtl.dat
>
> i copied icudtl.dat to the project directory from v8 directory. Any help is
> greatly appreciated.

You can pass nullptr as the second argument and V8 will look for
icudtl.dat relative to the executable.

If you pass in a file path, it should be either absolute or relative
to the current working directory (_not_ the executable.)

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[v8-users] InitializeICUDefaultLocation

2018-05-26 Thread Joe Smack
What is the proper way to do this function? I just can't get it to work.

My code:
const char * exec_path = "C:\\Users\\Joe Smack\\Documents\\Visual Studio 
2017\\Projects\\v8 console test\\v8 console test";
const char * icu_data_file = "icudtl.dat";
V8::InitializeICUDefaultLocation(exec_path, icu_data_file);

This code is giving me an exception in the function InitializeICU (called 
from InitializeICUDefaultLocation) when it gets to FILE* inf = 
fopen(icu_data_file, "rb"); (line 95)
The debugger says icu_data_file = icudtl.dat

i copied icudtl.dat to the project directory from v8 directory. Any help is 
greatly appreciated.



-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.