On Thu, 15 Oct 2020, Tim Wetterek Andersson wrote:

I am sorry for not really understanding but is what you mean I should try using like "lang sv ...." for the whole report template?

Please keep the conversation on the users list so others can potentially benefit in the future.

That might be a solution, but it presumes your language is set to Swedish, rather than being set to English and just overriding all the default English messages with Swedish text...

All I can say is: try it and see if it works.

Create a 30_text_sv.cf file in your local configuration folder, and put in stuff that's similar to one of the existing translation files. These are what we already have in the base code:

https://svn.apache.org/viewvc/spamassassin/trunk/rules/30_text_de.cf
https://svn.apache.org/viewvc/spamassassin/trunk/rules/30_text_fr.cf
https://svn.apache.org/viewvc/spamassassin/trunk/rules/30_text_it.cf
https://svn.apache.org/viewvc/spamassassin/trunk/rules/30_text_nl.cf
https://svn.apache.org/viewvc/spamassassin/trunk/rules/30_text_pl.cf
https://svn.apache.org/viewvc/spamassassin/trunk/rules/30_text_pt_br.cf

(Click the "(view)" link near the top to see the file itself, click the "(download)" link to download a copy to edit.)

Don't worry about all the rule description translations unless you want to. Focus on the report template translations first.

I don't have a suggestion for the proper encoding to use. But with the proper encoding set, you should be able to just paste in the appropriate text without having to fiddle around with escapes.

Let us know how that goes!


A general note to the list: more translations would be gratefully welcomed, if anyone wants to provide languages that we don't currently have.



Thanks

Tim Wetterek Andersson
Digitaliseringsavdelningen, Norrköpings kommun
Telefon/SMS: +46725935115

-----Ursprungligt meddelande-----
Från: John Hardin <jhar...@impsec.org>
Skickat: den 22 september 2020 19:51
Till: users@spamassassin.apache.org
Ämne: Re: Character encoding in Report Templates

On Tue, 22 Sep 2020, Tim Wetterek Andersson wrote:

I am very new to SpamAssassin and I can not get the following to work:

I am trying to use the swedish characters åäö in the report template I have set 
up in my SpamAssasin instances.

FYI, QP encodes that as: the swedish characters =E5=E4=F6

I have tried using the ASCII-tables described here
<https://cwiki.apache.org/confluence/display/SPAMASSASSIN/WritingRules
Advanced> but the only thing that shows is the following below.

That's specific to writing the regular expressions used in rules. Report 
template text is just... text.

Excerpts of different config outputs I've tried:

Spam programvaran /p(?:\xfc|\xc3\xa5)/ "xxxx"

Spam programvaran p(?:\xfc|\xc3\xa5) "xxxx"

I note that none of the characters there are \xe5, \xe4 or \xf6.

Excerpts of how the mail looks without tried configs:

Spam programvaran på "xxxx"

FYI, QP encodes that as: Spam programvaran p=C3=A5 "xxxx"

...so the second half of what you used (\xc3\xa5) *is* being emitted in the 
report.

Try:

  Spam programvaran p\xe5 "xxxx"


Did you try just pasting in the proper accented text verbatim? Explicit hex 
values shouldn't be needed. See the report lines of this for example:

https://cwiki.apache.org/confluence/display/SPAMASSASSIN/TranslateFrench


--
 John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
 jhar...@impsec.org                         pgpk -a jhar...@impsec.org
 key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
  Never forget, even for an instant, that the one and only reason
  anyone has for taking your gun away is to make you weaker than
  he is, so he can do something to you that you wouldn’t let him
  do if you were equipped to prevent it. This goes for burglars,
  muggers, and rapists, and even more so for policemen,
  bureaucrats, and politicians.                     -- Alexander Pope
-----------------------------------------------------------------------
 Today: the 491st anniversary of the muslim Ottoman defeat at Vienna

Reply via email to