gnustep-dev
[Top][All Lists]
Advanced

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

Re: Fwd: Issue with NSDateFormatter on Windows with ICU...


From: Stefan Bidi
Subject: Re: Fwd: Issue with NSDateFormatter on Windows with ICU...
Date: Wed, 28 Nov 2012 16:39:01 -0600

I think that might be the case. The only thing I can think of is that a call to malloc is failing inside ICU.

On Nov 28, 2012 11:34 AM, "Gregory Casamento" <address@hidden> wrote:
Sorry, forgot to forward to the list...

GC

---------- Forwarded message ----------
From: Gregory Casamento <address@hidden>
Date: Wed, Nov 28, 2012 at 12:31 PM
Subject: Re: Issue with NSDateFormatter on Windows with ICU...
To: Stefan Bidi <address@hidden>


Yes, that's correct I am using mingw.   Here is the information:


address@hidden ~
$ gcc test_udat.c  -lpthread -lm   -L/mingw/bin -licui18n -licuuc -licudata  -l
pthread -lm

address@hidden ~
$ a.exe
(1) Error Code: U_MEMORY_ALLOCATION_ERROR
(2) Error Code: U_MEMORY_ALLOCATION_ERROR

address@hidden ~
$ icu-config --version
4.6

address@hidden ~
$


On Wed, Nov 28, 2012 at 12:20 PM, Stefan Bidi <address@hidden> wrote:

Assuming you are running the gnustep mingw environment, you should be able to use icu-config --ldflags. I can't remember where icu-config is on windows and I no longer have a windows install to check.

On Nov 28, 2012 11:14 AM, "Gregory Casamento" <address@hidden> wrote:
Sorry I was delayed on getting back to this.   Work and sleep interfered.   I ran the tests, same issue.   The problem is in the initialization code of NSDateFormatter itself, not in how Gorm is initializing it.

I got your test program... the only issue is that I can't figure out WHERE ICU is installed on windows so that I can give the correct directive to gcc via -L.   Any idea?

GC


On Tue, Nov 27, 2012 at 9:10 PM, Stefan Bidi <address@hidden> wrote:
Greg,
Can you compile and run the attached test.  It is really simple and
will say if the ICU lib on your system is working or not.

On Tue, Nov 27, 2012 at 6:53 PM, Stefan Bidi <address@hidden> wrote:
> Greg, what happens if you run the NSDateFormatter tests?  Does
> everything still crash?
>
> I'll prepare a set of tests to exercise the ICU functionality.  That
> might help figure out what is going on here.  Which version of the ICU
> and base are you using?
>
> On Tue, Nov 27, 2012 at 3:43 PM, Gregory Casamento
> <address@hidden> wrote:
>> Same result.
>>
>>
>> On Tue, Nov 27, 2012 at 2:02 PM, Stefan Bidi <address@hidden> wrote:
>>>
>>> No, this is correct. ICU requires Unicode for time zones.
>>>
>>> The thing is that ICU does not recognize the Windows timezone names, they
>>> must be in the Olson format.
>>>
>>> A work around might be to set that to null for now and see if that works.
>>>
>>> On Nov 27, 2012 12:25 PM, "Richard Frith-Macdonald"
>>> <address@hidden> wrote:
>>>>
>>>>
>>>> On 27 Nov 2012, at 18:18, Gregory Casamento wrote:
>>>>
>>>> >
>>>> > Here is what is being sent....
>>>> >
>>>> > (gdb) p *(NSDateFormatterInternal *)_internal
>>>> > $3 = {{isa = 0x6702f740}, _behavior = 0, _locale = 0x41f9a28,
>>>> >   _tz = 0x278ce08, _timeStyle = 0, _dateStyle = 0, _formatter = 0x0}
>>>> > (gdb) p NSToUDateFormatStyle(0)
>>>> > $4 = -1
>>>> > (gdb) po ((NSDateFormatterInternal *)_internal)->_locale
>>>> > en_US
>>>> > (gdb) p tzID
>>>> > $6 = (
>>>> >     UChar *) 0x4202b80 "E\000a\000s\000t\000e\000r\000n\000
>>>> > \000S\000t\000a\000n
>>>> > \000d\000a\000r"
>>>>
>>>> The thing that strikes me instantly is that we are looking at unicode
>>>> (16bit characters).
>>>> Could it be that the ICU library routine is expecting ascii or utf-8, but
>>>> because windows uses 16bit characters natively it's getting confused?
>>>> If so, that would be easy to fix.
>>>>
>>
>>
>>
>> --
>> Gregory Casamento
>> Open Logic Corporation, Principal Consultant
>> yahoo/skype: greg_casamento, aol: gjcasa
>> (240)274-9630 (Cell)
>> http://www.gnustep.org
>> http://heronsperch.blogspot.com



--
Gregory Casamento
Open Logic Corporation, Principal Consultant
yahoo/skype: greg_casamento, aol: gjcasa
(240)274-9630 (Cell)
http://www.gnustep.org
http://heronsperch.blogspot.com



--
Gregory Casamento
Open Logic Corporation, Principal Consultant
yahoo/skype: greg_casamento, aol: gjcasa
(240)274-9630 (Cell)
http://www.gnustep.org
http://heronsperch.blogspot.com



--
Gregory Casamento
Open Logic Corporation, Principal Consultant
yahoo/skype: greg_casamento, aol: gjcasa
(240)274-9630 (Cell)
http://www.gnustep.org
http://heronsperch.blogspot.com

_______________________________________________
Gnustep-dev mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/gnustep-dev


reply via email to

[Prev in Thread] Current Thread [Next in Thread]