[Lazarus] UTF8 string handling problem under linux

Xiangrong Fang xrfang at gmail.com
Wed Aug 14 11:48:58 CEST 2013


To help reproduce the problem, I altered the program a bit so that it does
not look for a folder containing CJK path.  To reproduce the problem:

1) compile and run this program under Linux (I am running Ubuntu 13.04
amd64).
2) Click the "Write" button and choose the included "test.txt" file.
3) Click the "Read" button, the program will crash.

Note: the test.txt file contains two lines, the program only read the first
line, if that line contains CJK, it will crash.

Thanks,
Shannon



2013/8/14 Xiangrong Fang <xrfang at gmail.com>

> Hi All,
>
> Could anyone take a look at the problem?  I would like to confirm if this
> is my problem or a bug in lazarus / fpc.
>
> Thanks,
> Shannon
>
>
> 2013/8/12 Xiangrong Fang <xrfang at gmail.com>
>
>> There is no backtrace at all, the only info I get when starting from
>> command line is:
>>
>> xrfang at fxrmm:~/Desktop/testutf8$ ./project1
>> TApplication.HandleException Access violation
>>   Stack trace:
>>   $00007F2ACBF9DBD0
>>
>>
>> Please provide a backtrace.
>>
>>> What is r?
>>>
>>
>> r is a TRegistry object, please see attached source code.
>>
>>
>>> What compiler version?
>>>
>>
>> FPC 2.6.2, Lazarus 1.0.10
>>
>> I suspect this is a bug in related library code, because even if the
>> result is not correct, it should not crash.  Note that this error ONLY
>> occur when I choose a directory with CJK character in its path.
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20130814/7c7dfd08/attachment-0006.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testutf8.tar.gz
Type: application/x-gzip
Size: 2437 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20130814/7c7dfd08/attachment-0006.bin>


More information about the Lazarus mailing list