[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netCDF #YVO-179076]: NetCDF / nc_open / c++
- Subject: [netCDF #YVO-179076]: NetCDF / nc_open / c++
- Date: Mon, 23 Apr 2018 11:03:10 -0600
You appear to be running under windows visual studio, correct?
The first thing I would do is to either print out the converted name,
or using the VS debugger, look at the utf8 bytes and see if they match
the name of the file you are trying to open.
>
>
> pls, i hope you can help me.
>
> I'm trying to open NetCDF- Files using nc_open.
>
> Filenames are of type "wchar_t", so i have to translate them to UTF-8.
>
> Pls, ref to source below
>
> ==========
>
> int size_needed = WideCharToMultiByte(CP_UTF8, 0, g_cOpen, -1,
> NULL, 0, NULL, NULL);
> char *opener = new char[size_needed];
> WideCharToMultiByte(CP_UTF8, 0, g_cOpen, -1, &opener[0],
> size_needed, NULL, NULL);
>
> ret2=nc_open(opener,NC_NOWRITE,&ncid);
>
> ===========
>
> Once, the filename and/or path includes "Non-ASCII"- signs, nc_open
> returns 2 (can not find file)
>
> or 3 (canot find path).
>
> Is nc_open able to handle UTF8 ?
>
> Thks in advance
>
> Thomas Wälde-Nuber
>
>
>
=Dennis Heimbigner
Unidata
Ticket Details
===================
Ticket ID: YVO-179076
Department: Support netCDF
Priority: Normal
Status: Open
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata
inquiry tracking system and then made publicly available through the web. If
you do not want to have your interactions made available in this way, you must
let us know in each email you send to us.