Error showing blank page when saving with Unicode encoding

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
duongnvm
Posts: 35
Joined: 19 May 2010, 07:26

Error showing blank page when saving with Unicode encoding

Post by duongnvm »

I want to note some information in the configuration file, the notes want accented characters (Vietnamese language).
However, an error is occurring while browsing the mantis pages.

If storing the configuration file with encoding as UTF-8, when browsing mantis pages, you will get a page with the message "Possible Whitespace/Error in Configuration File - Aborting. Output so far follows: string(3) """

If you store the configuration file with Unicode encoding, when browsing mantis pages, you will get a blank page.

Thanks!
Attachments
2022-03-14_110947.png
2022-03-14_110947.png (62.37 KiB) Viewed 2383 times
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Error showing blank page when saving with Unicode encoding

Post by atrol »

You have to store as UTF-8 without BOM.
Please use Search before posting and read the Manual
duongnvm
Posts: 35
Joined: 19 May 2010, 07:26

Re: Error showing blank page when saving with Unicode encoding

Post by duongnvm »

atrol wrote: 14 Mar 2022, 05:41 You have to store as UTF-8 without BOM.
Thanks for atrol!
Sorry, what is "BOM"?
As I mentioned, if storing with Encoding as UTF-8, will result in error "Possible Whitespace/Error in Configuration File - Aborting. Output so far follows: string(3) """.
And, I want to need to make notes in Vietnamese language.
Attachments
2022-03-14_110916.png
2022-03-14_110916.png (65.83 KiB) Viewed 2367 times
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Error showing blank page when saving with Unicode encoding

Post by atrol »

duongnvm wrote: 14 Mar 2022, 07:25 Sorry, what is "BOM"?
https://stackoverflow.com/questions/222 ... ithout-bom

Does your config_inc.php contain a closing PHP tag "?>" ?
If yes, remove it, as there might exist some content after it.
Please use Search before posting and read the Manual
duongnvm
Posts: 35
Joined: 19 May 2010, 07:26

Re: Error showing blank page when saving with Unicode encoding

Post by duongnvm »

Thanks for atrol!
No, my config_inc.php configuration file does not contain the closing "?>" tag.
Current ends with #$g_show_detailed_errors = ON;
Only save as with ANSI encoding will work.
PS:
- OS: Window Server 2019 Standard Evaluation.
- AppServer 9.3.0.
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Error showing blank page when saving with Unicode encoding

Post by atrol »

So you ensured that the file is stored without BOM?
Can you post the file (after removing passwords, ...)?
Please use Search before posting and read the Manual
duongnvm
Posts: 35
Joined: 19 May 2010, 07:26

Re: Error showing blank page when saving with Unicode encoding

Post by duongnvm »

Yes, the config file is like this!
Attachments
config_inc.rar
(786 Bytes) Downloaded 298 times
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Error showing blank page when saving with Unicode encoding

Post by atrol »

Your file is UTF-16 with BOM.
I asked you to try UTF-8 without BOM.
E.g. you could use Notepad++ to view / convert / store in another format.
Please use Search before posting and read the Manual
duongnvm
Posts: 35
Joined: 19 May 2010, 07:26

Re: Error showing blank page when saving with Unicode encoding

Post by duongnvm »

Thank you so much atrol!
I use Notepad++ which solved the problem.
Post Reply