Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / pas2js / 2023-02

.lfm files in utf16 question

5 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mgr. Janusz Chmiel

Dear MR Canneyt
,

I have created fully functioning WEB app thanks to Pas2JS, and thanks to profesionally created pas2jswidgets. But I Am facing big issue.
I want to use Czech characters in Textual assignements of GUI elements. It is possible to store .lfm file in UTF16 format, but in this case, Lazarus have issues to load .lfm form file. Is it possible to overcome this probl?m by typing long command line which will initiate .js script build proces without Lazarus? Or unfortunately, it will also crash, because stored form in UTF16 will not work also when such code will become The part of compiled .js script file?

You are one of The most elite Pas2js and Pascal programmer and I Am 100 % sure, that you know The work around.

I also found out, that I can not design GUi as a visually impaired user with no sight at all, but if I will cooperate with sighted human being, resulting apps can be usable.

FOrtunately, even though if I create many buttons without specifiing right form elements coordinates, special algorithms which are getting textual info inside my screen reader work smoothly. So The worst think that it can happen is, that screen will be empty or there will be only one Button with text visible.

But for Me, half automated solution and thanks to Lazarus build in Hot keys to access Component palete is usable for Me and I could finally create some Web apps. So thank all . Pas2JS_Widget authors for their development work. -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20230203/f71fb56f/attachment.htm>

Reply by email

Michael Van Canneyt
to Mgr. Janusz Chmiel
Mgr. Janusz Chmiel wrote 8 lines
Dear MR Canneyt , I have created fully functioning WEB app thanks to Pas2JS, and thanks to profesionally created pas2jswidgets. But I Am facing big issue. I want to use Czech characters in Textual assignements of GUI elements. It is possible to store .lfm file in UTF16 format, but in this case, Lazarus have issues to load .lfm form file. Is it possible to overcome this probl?m by typing long command line which will initiate .js script build proces without Lazarus?

To the best of my knowledge, .lfm files only support UTF8.

Or unfortunately, it will also crash, because stored form in UTF16 will not work also when such code will become The part of compiled .js script file?

Normally, UTF8 files should work in pas2js. It would be good if you could create a really small example that I can use to test your problem.

Michael.

Reply by email

Mgr. Janusz Chmiel
to Michael Van Canneyt

Dear Michael,
Similar little Internet radio players in Pas2js are possible thanks to your implementation which you have incorporated in to Web unit. My issue is, that Czech specific characters are displaied incorrectly. And using other encoding than UTF8 did not bring wanted results. I know, that you are using template and interactions with HTMl page. But RAPID development with forms have also some advantages. Sure, I know, that because I do not see at all, I can not place object to its good places so only screen reader work with such created .lfm forms, but I Am glad, that I can codesomething atleast for Myself and my sighted mother will tune The GUI elements for Me later if it will be needed. -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20230204/eed62c83/attachment.htm>

Reply by email

Mgr. Janusz Chmiel
to Michael Van Canneyt: To the best of my knowledge, .lfm files only support UTF8. Normally, UTF8 files should…

I have found out, that Lazarus stores compiled.js Java script file in The format UTF8 BOM. And .lfm files are stored as UTF8 without BOM.
So When I have used my loving Pas2jswidgets. When I have added Czech characters in to form by using Lazarus Form editor window. When I have compiled The project. I have resaved created .js file but no with encoding UTF8 BOM but I have changed encoding to UTF8 So no BOM.
As a result, all Czech characters are being displaied perfectly on Microsoft Windows. But I Am aware, that my finding is not big revolution related to this probl?m. Because when compiled .js files will be stored without BOM, Android operating syst?m will display Czech characters incorrectly. So I will hhave functioning solution only for Microsoft operating syst?m.

But may be, that my finding will help to find a professional repair solution.

So resaving .js file to UTF8 without YBOm is partial solution. So for now, to have Android operating syst?m to display characters correctly, I will have to really store Czech characters in to respektive GUI element properties in to onformcreate procedure event. I know, that UTF8 with BOM is important for Android. Because I had issues with this when I have compiled Android apps written by using PPCJVM and JVM target, OS Android. UTF8 without BOm causes wrong Czech characters display on Android devices. And I Am afraid, that I could get The same unpleasant result also when working with WEB app and .js file stored as UTF8 without BOM. -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/pas2js/attachments/20230226/e339a513/attachment.htm>

Reply by email