Answers.Body: <p>I do recall having read the specification for sepa (don't judge me, I had to) that says:</p>
  
  <ol>
  <li>the xml file is utf8 encoded</li>
  <li>but can only contain ascii-7 characters</li>
  </ol>
  
  <p>Did you try to upload the xml to your bank? I suppose they offer a test mode, you might want to try to check how it looks there</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-14T17:20:42.610Z
Answers.Text: That explains why UTF8 characters are turned into ASCII equivalents. I will do some testing with the bank as you suggest. Also, I will try to locate the place in the PHP code where characters are transformed to make sure I add a few more mappings. If you happen to know the right file... And no judgement for reading the SEPA specs; I am grateful for it!
Answers.UserDisplayName: Javier Elices
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-14T16:53:14.917Z
Answers.LastActivityDate: 2018-11-14T17:40:24.790Z
Answers.LastEditDate: 2018-11-14T17:40:24.790Z
Answers.UserDisplayName: Xavier
Body: <p>I have noticed that when using CiviSEPA to generate an XML file to be submitted to the bank for payment collection, no special characters get through. Some characters are converted into ASCII "equivalent" characters and some others into question marks <code>?</code>.</p>
  
  <p>I am using UTF-8 within CiviCRM. Also, the XML file generated starts with:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  </code></pre>
  
  <p>So the XML file encoding seems to be capable of using UTF-8 characters. Some examples:</p>
  
  <pre><code>Name       | Turns into
  ---------- | ----------
  Mónica     | Monica
  Begoña     | Begona
  Mª Dolores | M? Dolores
  </code></pre>
  
  <p>This seems to be a "feature" as some conversions seem to be getting the "closest" ASCII equivalent. But then the <em>Transaction Message</em> seems to be getting a worse treatment: <code>La fundación le agradece su aportación</code> turns into <code>La fundaci??n le agradece su aportaci??n</code>.</p>
  
  <p>I have tried generating XML files mostly with the <em>pain.008.001.02</em> PAIN version but it seems to be the same for the other PAIN versions.</p>
  
  <p>So I would like to know whether the XML files may contain any UTF-8 characters (and the average bank will accept that). If this is so, do I have something wrong in the CiviCRM configuration? Is there a way to fix this?</p>
  
Tags: <civisepa>
Title: CiviSEPA turns special characters of generated XML files into ASCII characters or question marks
ThreadText: # CiviSEPA turns special characters of generated XML files into ASCII characters or question marks
  
  (Asked by: username_0 on 2018-11-05)
  
  I have noticed that when using CiviSEPA to generate an XML file to be submitted to the bank for payment collection, no special characters get through. Some characters are converted into ASCII "equivalent" characters and some others into question marks ?.
  I am using UTF-8 within CiviCRM. Also, the XML file generated starts with:
  
  
  So the XML file encoding seems to be capable of using UTF-8 characters. Some examples:
  Name       | Turns into
  ---------- | ----------
  Mónica     | Monica
  Begoña     | Begona
  Mª Dolores | M? Dolores
  
  This seems to be a "feature" as some conversions seem to be getting the "closest" ASCII equivalent. But then the Transaction Message seems to be getting a worse treatment: La fundación le agradece su aportación turns into La fundaci??n le agradece su aportaci??n.
  I have tried generating XML files mostly with the pain.008.001.02 PAIN version but it seems to be the same for the other PAIN versions.
  So I would like to know whether the XML files may contain any UTF-8 characters (and the average bank will accept that). If this is so, do I have something wrong in the CiviCRM configuration? Is there a way to fix this?
  
  **Tags:** civisepa
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-11-14. Score: 2 | Accepted answer
  
  I do recall having read the specification for sepa (don't judge me, I had to) that says:
  
  1. the xml file is utf8 encoded
  2. but can only contain ascii-7 characters
  
  Did you try to upload the xml to your bank? I suppose they offer a test mode, you might want to try to check how it looks there
  
  > **Comments:**
  > **username_0**: That explains why UTF8 characters are turned into ASCII equivalents. I will do some testing with the bank as you suggest. Also, I will try to locate the place in the PHP code where characters are transformed to make sure I add a few more mappings. If you happen to know the right file... And no judgement for reading the SEPA specs; I am grateful for it!  
  
  ---
  
  