Page 1 of 1

Compilation problem!

Posted: Thu Mar 22, 2018 5:57 pm
by Lubos
The program I'm developing has Czech key descriptions. I've been tuning the program for some time now. Today we have a very strange behavior. The IDE program runs without error. After compiling into exe file, the functionality of the program remained, but in all texts every Czech character changed to:

d'z"

One character changes to four characters. :o Maybe I accidentally misplaced something wrong?

Re: Compilation problem!

Posted: Thu Mar 22, 2018 6:04 pm
by Shield
Might be a unicode / ASCII problem, but it's hard to say. You really have to provide some source code example that reproduces the problem.

Re: Compilation problem!

Posted: Thu Mar 22, 2018 7:35 pm
by Lubos
Shield wrote:.......... You really have to provide some source code example that reproduces the problem.
The problem has to be compilation somewhere. I took the old version, which was compiled beforehand without any problems, and now behaves the same way.
The source code is over 4000 rows, and texts are displayed distorted in all program windows.

Re: Compilation problem!

Posted: Thu Mar 22, 2018 9:57 pm
by skywalk
Close PureBasic IDE.
Open each source file in NotePad++ and verify or set the encoding = UTF-8-BOM.
Then open the PB IDE and make sure to set UTF-8 as default in preferences.
Also check if you changed your compiler options?

Code: Select all

; =================================================
; COMPILER OPTIONS:
;   [ ] Main source file:
;   [ ] Use Compiler:   PureBasic 5.62 (Windows - x64)
;   [x] Use Icon:       C:\myapp.ico
;   [ ] Enable inline ASM syntax coloring
;   [x] Create threadsafe executable
;   [x] Enable OnError lines support
;   [x] Enable modern theme support (for Windows XP and above)
;   [ ] Request Administrator mode for Windows Vista and above
;   [ ] Request User mode for Windows Vista (no virtualisation)
;   Library Subsystem:
;   Executable format:        Windows ;|Console|Shared DLL
;   CPU Optimisation:         All     ;|Dynamic|w/MMX|w/3DNOW|w/SSE|w/SSE2
;   Sourcefile Text encoding: UTF-8
; COMPILE/RUN:
;   [x] Create temporary executable in the source directory
; CONSTANTS:
; VERSION INFO/RESOURCES:
;   Update version info in:   C:\myapp.rc
; IDE PREFERENCES:ToolsPanel:Configuration:Procedure Browser
;   [x] Sort Procedures by name       ;<-- Alphabetical instead of order of appearance. Uncheck when location of Proc desired.
;   [ ] Group Markers                 ;<-- Checked changes ';-!' priority listing.
;   [ ] Display Procedure Arguments   ;<-- Too busy if checked.

Re: Compilation problem!

Posted: Thu Mar 22, 2018 10:55 pm
by Lubos
skywalk wrote:Close PureBasic IDE.
Open each source file in NotePad++ and verify or set the encoding = UTF-8-BOM.
NotePad ++ reports ANSI encoding. In IDE, the Czech text is perfect. Distortion occurs after compilation. That was not the case before. I've probably shaken some settings, but I have no idea where. Switching and converting to UTF-8 has not yet provided me with a good result.

Re: Compilation problem!

Posted: Fri Mar 23, 2018 12:09 am
by Lubos
skywalk wrote:Close PureBasic IDE.
Open each source file in NotePad++ and verify or set the encoding = UTF-8-BOM.
Then open the PB IDE and make sure to set UTF-8 as default in preferences.
Also check if you changed your compiler options?

An hour after my previous reply:

Your advice was right. I switch to PB 5.62 and I finally succeeded. It also must to delete the info that places the IDE at the end of the PB code. Hurrah. :D
Thank you very much.

Re: Compilation problem!

Posted: Fri Mar 23, 2018 12:48 am
by skywalk
Good deal.
I had a similar problem a while back.