View Issue Details

IDProjectCategoryView StatusLast Update
0017410LazarusLCLpublic2013-09-03 12:07
ReporterMiroslav Nyameshchuk Assigned ToBart Broersma  
Status closedResolutionfixed 
Product Version0.9.29 (SVN) 
Fixed in Version1.1 (SVN) 
Summary0017410: MaskEdit.Text don't work with cyrilic symbols
DescriptionMaskEdit.Text = ?? if input cyrilic symbols
TagsNo tags attached.
Fixed in Revisionr39175
Attached Files


parent of 0017381 closedFlorian FPC UTF8UpperCase on Windows98 


Bart Broersma

2010-09-14 16:04

developer   ~0041072

"This is not a bug, it is done by design."
TMaskEdit currently supports only ASCII input.
All non-ASCII input is denied and when setting the Text property (or pasting into the control), all non-ASCII characters are replaced with a question mark.

A non-ASCII characer (UTF8) can be up to 3 (or even more?) bytes/chars long, which will screw up internal calculations on the length of the mask, the position of mask-chars, cursor position and wether or not a char can be inserted.
(See my design comments in maskedit.pp)

An UTF8 version of TMaskEdit will require an almost complete re-design of the internal workings.

Given the low interest in this component (my own experience when I rewrote major parts of it), I guess that not so many people will contribute to it.
It can be done of course, so feel free to create (or derive from TMaskEdit) a TMaskEditUTF8 or make the current implementation work with UTF8 chars.

Marco van de Voort

2010-09-14 16:26

manager   ~0041074

Moved to lazarus->lcl on Zeljan's request.

Bart Broersma

2010-09-15 13:11

developer   ~0041107

I'll see what I can do, but this will take a long time I expect.
If you have ideas on how and what to change in the code, please let me know.

@manager: can you set target to post 1.0?

Bart Broersma

2010-12-03 16:27

developer   ~0043945

Note to myself: UTF8UpperCase on win9x needs to be fixed (issue 0017381) in order for this to work.

Bart Broersma

2010-12-21 18:08

developer   ~0044470

@Vincent: I don't think this issue is the parent of 0017381.
Handling UTF-8 characters in maskedit.pp was postponed (by me) because it was (or seemed) too complex for me at the time.
Having a functional UTF8UpperCase() on all platforms is merely a requirement to actually implement it without additional workarounds.
On Win9x (no native WideString uppercase handler) a plain UpperCase() will have to do (unless someone implements an UTF8UpperCase for Win9x), and maskedit.pp can simply detect wether this is necessary.
Once fixed in FreePascal RTL (calling CharUpperBuffWrapW instead of CharUpperBuffW for WideString uppercase on Win9x) the check in maskedit.pp can be removed.

Bart Broersma

2012-10-28 13:58

developer   ~0063520

Please test (thoroughly) and close if OK.

Miroslav Nyameshchuk

2012-10-29 09:49

reporter   ~0063536

Working. Thanks.

Issue History

Date Modified Username Field Change
2010-09-14 13:54 Miroslav Nyameshchuk New Issue
2010-09-14 13:54 Miroslav Nyameshchuk Widgetset => Win32/Win64
2010-09-14 16:04 Bart Broersma Note Added: 0041072
2010-09-14 16:26 Marco van de Voort Project Packages => Lazarus
2010-09-14 16:26 Marco van de Voort LazTarget => -
2010-09-14 16:26 Marco van de Voort Note Added: 0041074
2010-09-14 16:26 Marco van de Voort Category - => LCL
2010-09-15 13:04 Bart Broersma Status new => assigned
2010-09-15 13:04 Bart Broersma Assigned To => Bart Broersma
2010-09-15 13:11 Bart Broersma Note Added: 0041107
2010-09-15 13:38 Vincent Snijders LazTarget - => post 1.2
2010-12-03 16:27 Bart Broersma Note Added: 0043945
2010-12-03 16:34 Vincent Snijders Relationship added parent of 0017381
2010-12-21 18:08 Bart Broersma Note Added: 0044470
2012-10-28 13:58 Bart Broersma Fixed in Revision => r39175
2012-10-28 13:58 Bart Broersma Status assigned => resolved
2012-10-28 13:58 Bart Broersma Fixed in Version => 1.1 (SVN)
2012-10-28 13:58 Bart Broersma Resolution open => fixed
2012-10-28 13:58 Bart Broersma Note Added: 0063520
2012-10-29 09:49 Miroslav Nyameshchuk Note Added: 0063536
2012-10-29 14:15 Bart Broersma Status resolved => closed
2013-09-03 12:07 Martin Friebe LazTarget post 1.2 => 1.4