Hi Martin,<br>
<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div bgcolor="#FFFFFF" text="#000000"><div class="im"><br></div>
Hm, on my system 158 results in a "z" with some tilde or accent.<br></div></blockquote><div><br>Same here.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div bgcolor="#FFFFFF" text="#000000">
<br>
But that is probably the correct behaviour.<br>
<br>
For some reason the PassWordchar field accepts an ansi char, rather
than a utf8 char. So what you will see depends on the codepage of
the system on which your app is run. Even if it displays fine on
your PC, if you ship the app, other people will see other chars.<br>
<br>
How or why it becomes an * I do not know...<br></div></blockquote><div><br>I found why, but I can't explain the reason behind the code.<br>In lcl/interfaces/gtk2/gtk2wsstdctrls : <br></div><div><br>class procedure TGtk2WSCustomEdit.SetPasswordChar(<br>
const ACustomEdit: TCustomEdit; NewChar: char);<br>var<br> PWChar: Integer;<br> Entry: PGtkEntry;<br>begin<br> if not WSCheckHandleAllocated(ACustomEdit, 'SetPasswordChar') then<br> Exit;<br> Entry := PGtkEntry(ACustomEdit.Handle);<br>
if ACustomEdit.EchoMode=emNone then<br> PWChar:=0<br> else begin<br> PWChar:=ord(ACustomEdit.PasswordChar);<br> if (PWChar<192) or (PWChar=ord('*')) then<br> PWChar:=9679;<br> end;<br> gtk_entry_set_invisible_char(Entry,PWChar);<br>
end; <br><br>Commenting the following lines<br><br> if (PWChar<192) or (PWChar=ord('*')) then<br>
PWChar:=9679;<br><br>allows to display any char. But there must be a reason for this check and whoever wrote didn't bother writing a comment.<br><br>Regards,<br><br>Gerard.<br>
<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div bgcolor="#FFFFFF" text="#000000">
</div>
<br>--<br>
_______________________________________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lists.lazarus.freepascal.org">Lazarus@lists.lazarus.freepascal.org</a><br>
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus" target="_blank">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a><br>
<br></blockquote></div><br>