Imported settings cause bad encoding UTF-8 -> Western Windows

Hello,

 

I've created a simple file type definition for *.latte files and exported it in order to share it with a colleague. Unfortunately, the resulted *.sdlftsettings file appears to use Western Windows encoding instead of UTF-8 when working with some *.latte file. I see no way how to change this encoding implicitly in File Types settings or in *.sdlftsettings file. Has anyone met this problem earlier?
The code of the settings file is attached below. Thank you in advance for any suggestions and ideas.

Best Regards,

Jonáš.

 

 <?xml version="1.0" encoding="utf-8"?>
<SettingsBundle>
<SettingsGroup Id="Copy of RegEx v 1.0.0.0">
<Setting Id="InlineRules0">True</Setting>
<Setting Id="InlineRules2OpeningDef">(&lt;script(\s|\S|\n)*?&lt;\/script&gt;)|(&lt;style(\s|\S)*?&lt;\/style&gt;)|(&lt;!--(\s|\S)*?--&gt;)|(&lt;\/?(\s|\S)*?&gt;)</Setting>
<Setting Id="InlineRules">True</Setting>
<Setting Id="StructureRules0IsMultiLine">True</Setting>
<Setting Id="InlineRules3OpeningDef">"&amp;gt;</Setting>
<Setting Id="StructureRules0OpeningPattern">{block hiddentext}</Setting>
<Setting Id="InlineRules1OpeningDef">&amp;lt;</Setting>
<Setting Id="InlineRules1IgnoreCase">True</Setting>
<Setting Id="InlineRules1">True</Setting>
<Setting Id="InlineRules0OpeningDef">{</Setting>
<Setting Id="InlineRules4">True</Setting>
<Setting Id="InlineRules2">True</Setting>
<Setting Id="InlineRules4OpeningDef">a href="</Setting>
<Setting Id="QuickInsertsList">True</Setting>
<Setting Id="InlineRules0ClosingDef">}</Setting>
<Setting Id="StructureRules0">True</Setting>
<Setting Id="InlineRules0TagType">TagPair</Setting>
<Setting Id="StructureRules0ClosingPattern">{\/block}</Setting>
<Setting Id="FileTypeConfiguration_ComponentBuilderId">RegEx v 1.0.0.0</Setting>
<Setting Id="FileTypeConfiguration_ProfileData">
<FileTypeInformation xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="www.sdl.com/filetypesupport">
<Expression>(^[\d\D]*\.[lL][aA][tT][tT][eE]$)</Expression>
<FileDialogWildcardExpression>*.latte</FileDialogWildcardExpression>
<FileTypeDefinitionId>Copy of RegEx v 1.0.0.0</FileTypeDefinitionId>
<FileTypeDocumentName>Regular Expression Delimited Text Document</FileTypeDocumentName>
<FileTypeDocumentsName>Regular Expression Delimited Text Documents</FileTypeDocumentsName>
<FileTypeName>Latte</FileTypeName>
</FileTypeInformation>
</Setting>
<Setting Id="InlineRules3IgnoreCase">True</Setting>
<Setting Id="InlineRules4IgnoreCase">True</Setting>
<Setting Id="InlineRules3">True</Setting>
<Setting Id="InlineRules0IgnoreCase">True</Setting>
<Setting Id="StructureRules">True</Setting>
</SettingsGroup>
</SettingsBundle>

Parents Reply
  • The point here is that Studio would

    • preserve BOM only if there would be some
    • add BOM only if it would know there should be some (i.e. if it would know that the file should be in UTF-8)

    But because a) there is no BOM, and b) it apparently detects the file as being using Western European codepage, it "feels no need" to add the UTF-8 BOM.

    You can check the Active Document Settings dialog, which is very well hidden from common users ;-) - when a file is opened in Editor, go to the Advanced tab and in File Actions section you will see the button.
    You should be able to change the target file encoding here... and Studio should subsequently save the target file using correct encoding (and eventually also add the BOM according to the settings).

    If you ensure that the source files contain the UTF-8 BOM, Studio will assume UTF-8 as target encoding too.

    While there is a way to specify/force the source file encoding in the Open File dialog when going the Translate Single Document way, I'm not aware of any way to do the same when creating project... :-\
    Seems like another Studio usability problem...

Children
No Data