The BOM is inserted (and saved) in all newly created/converted UTF-8 files, ignoring the following options in INI files:
Write UTF-8 BOM=0
Write UTF-8 BOM NF=0
(UE v12.00a/12.10a)
Write UTF-8 BOM=0
Write UTF-8 BOM NF=0
(UE v12.00a/12.10a)
My first suggestion is to assign a hot key to command FileConvASCIItoUTF-8(UNICODE) in the key mapping configuration dialog. This would enable you to make the conversion with a single key stroke. You could also add the command to a toolbar, but the command does not have an icon. This is my best advice.hydrant wrote:I don't know how to make macro with conversion to UTF-8...
Now I see, you are right...Mofi wrote:Again! Best is to convert it manually to UTF-8 with a hot key when you need it. The macro is no real good solution.
I'm web application programmer so I edit mainly php, html files. I use smarty temlate engine (if you know it) too, and there is fatal problem with BOM. If I generate the HTML page with BOM on it, internet browsers can't display it properly. Maybe I could somehow setup apache/smarty but unfortunately I don't know how.Mofi wrote:What type of files do you edit which need UTF-8 encoding, but without BOM and without appropriate charset or encoding specification in the file header before first multi-byte character?
I thought already that you are writing on HTML files. Well, browsers don't like the BOM, that's true. But they also needs to know, that the file is an UTF-8 file. So you should specify the charset correctly. You have to insert the line with the charset specification in the <head> section before first occurence of an UTF-8 multi-byte character (title, description, keywords, ...).hydrant wrote:I'm web application programmer so I edit mainly php, html files.
No, not directly. But it's possible to do it with a macro trick because UTF-8 files are most HTML or XML files with an appropriate character encoding specification. So you have to create first a template file for HTML and/or XML. Here is an example:johna wrote:Is it possible to always create new files as UTF-8 without BOM (not UNICODE with BOM as it seems to be an option)?
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title></title>
</head>
<body>
</body>
</html>