| Anonymous | Login | Signup for a new account | 2013-05-25 06:27 CEST | ![]() |
| All Projects | FPC | Lazarus: Packages, Patches | Lazarus CCR | Mantis | fpGUI | fpcprojects: fpprofiler |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
| 0021931 | Lazarus | LCL | public | 2012-05-03 13:19 | 2012-09-15 13:40 | ||||||||
| Reporter | lingling | ||||||||||||
| Assigned To | |||||||||||||
| Priority | normal | Severity | minor | Reproducibility | always | ||||||||
| Status | feedback | Resolution | open | ||||||||||
| Platform | OS | OS Version | |||||||||||
| Product Version | 0.9.30.2 | Product Build | |||||||||||
| Target Version | Fixed in Version | ||||||||||||
| Summary | 0021931: stringreplace have not right result | ||||||||||||
| Description | this code ,the result right is : 你们好sde but the result is : 大家好sde why,must be delete 'sde' can show right result. how to return the right result ? my windows is chinese edition. procedure TForm1.Button1Click(Sender: TObject); var aStr:String; begin aStr:='大家好sde'; aStr:=StringReplace(aStr,'大家好','你们好',[rfReplaceAll, rfIgnoreCase]); showmessage(aStr); end; | ||||||||||||
| Tags | No tags attached. | ||||||||||||
| Fixed in Revision | |||||||||||||
| LazTarget | - | ||||||||||||
| Widgetset | Win32/Win64, WinCE | ||||||||||||
| Attached Files | |||||||||||||
Relationships |
||||||
|
||||||
Notes |
|
|
(0059261) Bart Broersma (developer) 2012-05-05 18:04 |
I cannot reproduce this with Lazarus 1.1 (Lazarus 1.1 r37066 FPC 2.6.0 i386-win32-win32/win64) See attached screenshot: I copied the strings form this report. Can you test with Lazarus trunk with attached sample program? |
|
(0059326) lingling (reporter) 2012-05-07 02:51 edited on: 2012-05-07 02:52 |
hello,i run your project in lazarus 0.9.30.2,but this code can't run,show error: begin RequireDerivedFormResource := True; Application.Initialize; Application.CreateForm(TForm1, Form1); Application.Run; end. and i delete the code: RequireDerivedFormResource := True; then run it ,but the reselt is still error is: 大家好sde when i tryied change the options in: procedure TForm1.Button1Click(Sender: TObject); var aStr:String; begin aStr:='大家好sde'; aStr:=StringReplace(aStr,'大家好','你们好',[rfReplaceAll]); showmessage(aStr); end; procedure TForm1.Button1Click(Sender: TObject); var aStr:String; begin aStr:='大家好sde'; aStr:=StringReplace(aStr,'大家好','你们好',[]); showmessage(aStr); end; the result is right ,but can't upper lowercase letters. why??? i think it is a bug in fpc tsearch unit, can you modify it to right? |
|
(0059348) Bart Broersma (developer) 2012-05-07 11:36 |
There will be no more fixes for the 0.9.30 branch AFAIK, so please test with trunk. If it fails then please attach a screenshot (from my program) because most of the time I cannot read your characters in the browser (depends on my current machine and OS). If I underatnd you correctly the problem appears to be in the Uppercase part (and all is correct with lowercase)? In that case, you might try inclusing LazUtf8 unit in your program (again, in trunk) and report if that fixes the issue. |
|
(0059376) lingling (reporter) 2012-05-08 03:20 |
i added the unit lazutf8, but it show : can't find the unit lazutf8 unit Unit1; {$mode objfpc}{$H+} interface uses Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,lazutf8; type { TForm1 } TForm1 = class(TForm) procedure Button1Click(Sender: TObject); private { private declarations } public { public declarations } end; var Form1: TForm1; implementation {$R *.lfm} { TForm1 } procedure TForm1.Button1Click(Sender: TObject); var aStr:String; begin aStr:='大家好sde'; aStr:=StringReplace(aStr,'大家好','你们好',[rfReplaceAll, rfIgnoreCase]); showmessage(aStr); end; end. |
|
(0059379) Takeda Matsuki (reporter) 2012-05-08 08:21 |
StringReplace, works fine with me, here. I test using, Chinese (traditional), Japanese, Thailand, and Vietnamese. I'm using Lazarus v1.1 svn 37216. NOTE : Please, don't wrote Unicode Characters in SynEdit and use it directly into process. I don't know why, Character (unicode) which came from SynEdit directly, sometime would not working properly to get interaction with us. (See : http://bugs.freepascal.org/view.php?id=21817 [^] ) Regards, Takeda. |
|
(0059416) Bart Broersma (developer) 2012-05-08 23:02 |
> i added the unit lazutf8, but it show : can't find the unit lazutf8 Did you do this in trunk (as I repeatedly asked you) or still 0.9.30.2? |
|
(0060092) Martin Friebe (manager) 2012-05-31 19:51 |
@Takeda: about the SynEdit issue. Please indicate if this can be discussed on the forum, mail-list or private mail ( lazarus # mfriebe.de ). As it is off-topic to this bug. Have you tried: {$codepage utf8} in the source. maybe the compiler expects the wrong encoding. Also have you checked the file in an other editor, or edited it outside the IDE and then compiled it? |
|
(0062378) Bart Broersma (developer) 2012-09-15 13:40 edited on: 2012-09-15 13:40 |
@lingling: Please test with 1.0 If no feedback is given, this report will be closed. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2012-05-03 13:19 | lingling | New Issue | |
| 2012-05-03 13:19 | lingling | Widgetset | => Win32/Win64, WinCE |
| 2012-05-05 18:01 | Bart Broersma | File Added: StringReplace.png | |
| 2012-05-05 18:02 | Bart Broersma | File Added: StringReplace.zip | |
| 2012-05-05 18:04 | Bart Broersma | LazTarget | => - |
| 2012-05-05 18:04 | Bart Broersma | Note Added: 0059261 | |
| 2012-05-05 18:04 | Bart Broersma | Status | new => feedback |
| 2012-05-07 02:51 | lingling | Note Added: 0059326 | |
| 2012-05-07 02:52 | lingling | Note Edited: 0059326 | |
| 2012-05-07 11:36 | Bart Broersma | Note Added: 0059348 | |
| 2012-05-08 03:20 | lingling | Note Added: 0059376 | |
| 2012-05-08 08:21 | Takeda Matsuki | Note Added: 0059379 | |
| 2012-05-08 23:02 | Bart Broersma | Note Added: 0059416 | |
| 2012-05-31 15:23 | Bart Broersma | Relationship added | related to 0022148 |
| 2012-05-31 19:51 | Martin Friebe | Note Added: 0060092 | |
| 2012-09-15 13:40 | Bart Broersma | Note Added: 0062378 | |
| 2012-09-15 13:40 | Bart Broersma | Note Edited: 0062378 | |
| Main | My View | View Issues | Change Log | Roadmap |



