Sign in Join

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

Mailing lists / lazarus / 2008-06

Unicod(ed) PAS files in IDE editor

7 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Andrey Gusev

My sources contain many (too many) string constants encoded in Win1251 codepage.
Being translated to Unicode such source files can't shown accurately in IDE editor
on my Russia-localized WinXP-box.

I can:
1. Modify sources to use AnsiToUTF8 (or UTF8Encode)
2. Take out all string constants from pas-files to resourcestring files

Maybe somebody knows somewhat else ?

What fonts may be used to direct using Unicode PAS files ?

Reply by email

Felipe Monteiro de Carvalho
to Andrey Gusev
My sources contain many (too many) string constants encoded in Win1251 codepage.

We took a great care to make sure string constants keep working. It's probably just a configuration problem.

Andrey Gusev wrote
Being translated to Unicode such source files can't shown accurately in IDE editor on my Russia-localized WinXP-box.

Could you:

1 - Post a screenshot with your editor window
2 - Post a source file which presents the problem so we can also test it

What fonts may be used to direct using Unicode PAS files ?

Courier New, Courier should be good guesses. In Windows XP many fonts support already a large amount of unicode glyphs.

What font are you currently using?

thanks,

Felipe Monteiro de Carvalho

Reply by email

Mattias Gaertner
to Andrey Gusev: My sources contain many (too many) string constants encoded in Win1251 codepage. Being…
Show quoted text 5 lines
My sources contain many (too many) string constants encoded in Win1251 codepage. Being translated to Unicode such source files can't shown accurately in IDE editor on my Russia-localized WinXP-box.

You can see more output about encoding when you compile the IDE with -dVerboseIDEEncoding

Open the 1251 file and take a look at
source editor / Popup menu / File Settings / Encoding / Is the 1251 marked or UTF8?

Show quoted text 8 lines
I can: 1. Modify sources to use AnsiToUTF8 (or UTF8Encode) 2. Take out all string constants from pas-files to resourcestring files Maybe somebody knows somewhat else ? What fonts may be used to direct using Unicode PAS files ?

Mattias

Reply by email

Andrey Gusev
to Felipe Monteiro de Carvalho: We took a great care to make sure string constants keep working. It's probably just a…

* Felipe Monteiro de Carvalho [Thu,
5 Jun 2008 10:27:06 -0300]:

On Thu, Jun 5, 2008 at 7:47 AM, Andrey Gusev wrote: > My sources contain many (too many) string constants encoded in

Win1251

> codepage. We took a great care to make sure string constants keep working. It's probably just a configuration problem.

Where it can be tuned ?

Show quoted text 6 lines
> Being translated to Unicode such source files can't shown accurately > in IDE editor on my Russia-localized WinXP-box. [...] What font are you currently using?

"Lucida console" was used.
It works fine now - source file was translated uncorrectly.

Reply by email

Mattias Gaertner
to Andrey Gusev
Show quoted text 22 lines
* Felipe Monteiro de Carvalho [Thu, 5 Jun 2008 10:27:06 -0300]: > On Thu, Jun 5, 2008 at 7:47 AM, Andrey Gusev > wrote: > > My sources contain many (too many) string constants encoded in Win1251 > > codepage. > > We took a great care to make sure string constants keep working. > It's probably just a configuration problem. Where it can be tuned ? > > Being translated to Unicode such source files can't shown > > accurately in IDE editor on my Russia-localized WinXP-box. > > [...] > > What font are you currently using? "Lucida console" was used. It works fine now - source file was translated uncorrectly.

Can you give some hints, what you did wrong and how you solved the problem, so this info can be added to the wiki?

Mattias

Reply by email

Andrey Gusev
to Mattias Gaertner: On Thu, 05 Jun 2008 14:47:53 +0400 You can see more output about encoding when you…

* Mattias Gaertner [Thu, 5 Jun 2008 15:52:52
+0200]:

On Thu, 05 Jun 2008 14:47:53 +0400 Andrey Gusev wrote: > My sources contain many (too many) string constants encoded in

Win1251

Show quoted text 11 lines
> codepage. > Being translated to Unicode such source files can't shown accurately > in IDE editor > on my Russia-localized WinXP-box. You can see more output about encoding when you compile the IDE with -dVerboseIDEEncoding Open the 1251 file and take a look at source editor / Popup menu / File Settings / Encoding / Is the 1251 marked or UTF8?

IDE correctly recognize source file encodings, take both my cases: 1251 and UTF-8.

Show quoted text 12 lines
> > > Being translated to Unicode such source files can't shown > > > accurately in IDE editor on my Russia-localized WinXP-box. > > > > [...] > > > > What font are you currently using? > > "Lucida console" was used. > It works fine now - source file was translated uncorrectly. Can you give some hints, what you did wrong and how you solved the problem, so this info can be added to the wiki?

Doubdtly, that it will be useful or hintable (for all), it was taken SuperEdi for translation,
in it it's easy to get confused (he don't recognize loaded file encoding automatically).

***
That's great - IDE can eat mixed-encoded sources and have no interference
between parts!
I have LFM that 1251-coded and it's PAS that Uni-coded - ant it works fine.
This approach will kept in the future ?

Reply by email

Felipe Monteiro de Carvalho
to Andrey Gusev
Andrey Gusev wrote
This approach will kept in the future ?

Yes, but I think it doesn't make sense to have the lfm files in anything else other then utf-8. If you know what you are doing, you can have the source files in any encoding and deal with that, but the lfm goes directly to LCL, which will only support unicode in the future.

Felipe Monteiro de Carvalho

Reply by email