[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #AZO-523030]: netCDF text attribute question



You should probably allocate len+1 instead of len to be safe.
Anyway, can you tell me what value of len is returned?

On 8/8/2022 10:54 AM, Roman Zamiesal wrote:
> New Client Reply: netCDF text attribute question
>
> Yes ,  I have function nc_inq_attlen(band, -1, "facility_or_tool",&len); , 
> value is text lenght correct
>   
> like this : char* text = stackalloc char[len];
> ______________________________________________________________
>> Od: "Unidata netCDF Support" <address@hidden>
>> Komu: address@hidden
>> Dátum: 08.08.2022 18:04
>> Predmet: [netCDF #AZO-523030]: netCDF text attribute question
>>
> What value does nc_inq_attlen(band, -1, "facility_or_tool",&len);
>   give you where len is a size_t variable to hold the length.
>   
>   On 8/8/2022 8:53 AM, Doug Dirks wrote:
>   > New Ticket: netCDF text attribute question
>   >
>   > Hello Roman,
>   >
>   > We received your message via Unidata's "Please Contact Me" web form. Your 
> message is copied below.
>   >
>   > I have entered your question in Unidata's e-mail support system so it can 
> be addressed by one of our software engineers. In the future, if you send 
> messages directly to "address@hidden" we will be able to respond more quickly.
>   >
>   > Thank you,
>   > Doug Dirks
>   > Unidata Community Services
>   >
>   > ---------------------------------------------------------
>   > Your message:
>   >
>   > Hallo,
>   >
>   > I work with necdf.dll in program language C# , I wan read text in 
> attribute , I can read double , float , int ....  , I can read  attribute 
> with one word example "T", but if attribute include long word example  "TIME" 
> I get out symbol  "?" question mark.
>   >
>   > I read global attribudes:
>   >
>   >   char* text = stackalloc char[3];
>   >
>   >   nc_get_att_text(band, -1, "facility_or_tool", text);
>   >
>   > text[0]  - this is firs word but I get symbol "?"
>   >
>   > Sorry for my bad english:)
>   >
>   > Thanks for help.
>   >
>   >
>   > Ticket Details
>   > ===================
>   > Ticket ID: AZO-523030
>   > Department: Support netCDF
>   > Priority: Low
>   > Status: Open
>   > Link:  
> https://andy.unidata.ucar.edu/staff/index.php?_m=tickets&_a=viewticket&ticketid=33459===================
>  
> <https://andy.unidata.ucar.edu/staff/index.php?_m=tickets&_a=viewticket&ticketid=33459===================>
>   > 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.
>   >
>   
>   
>   
>   Ticket Details
>   ===================
>   Ticket ID: AZO-523030
>   Department: Support netCDF
>   Priority: Low
>   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.
>   
>   
>
>
>
>
> Ticket Details
> ===================
> Ticket ID: AZO-523030
> Department: Support netCDF
> Priority: Low
> Status: Open
> Link:  
> https://andy.unidata.ucar.edu/staff/index.php?_m=tickets&_a=viewticket&ticketid=33459
>



Ticket Details
===================
Ticket ID: AZO-523030
Department: Support netCDF
Priority: Low
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.