# Problem with character special in odt

**URL:** <https://www.dolibarr.org/forum/t/problem-with-character-special-in-odt/22180>\
**Category:** CRM/SRM Modules\
**Tags:** v15\
**Created:** [April 13, 2022, 9:43pm UTC](https://www.dolibarr.org/forum/t/problem-with-character-special-in-odt/22180 "2022-04-13T21:43:37Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![farneyaurelio](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/farneyaurelio/32/6313_2.png) [@farneyaurelio](https://www.dolibarr.org/forum/u/farneyaurelio)\
**Post date:** [April 13, 2022, 9:43pm UTC](https://www.dolibarr.org/forum/t/problem-with-character-special-in-odt/22180/1 "2022-04-13T21:43:37Z")

</div>

Hello friends,

I have a small problem in my odt templates. When I generate a contract, for example, in the content of my products that have special characters they look like this. Is there any configuration to be done to show accentuation? I ask this because when I use native templates like strat I don’t have this problem.

![image](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/8/801477d97d7f0aabf070690f91ca2053e9f1784d.png)

---

<div class="post-metadata">

**Author:** ![trekmorris](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@trekmorris](https://www.dolibarr.org/forum/u/trekmorris)\
**Post date:** [April 13, 2022, 10:28pm UTC](https://www.dolibarr.org/forum/t/problem-with-character-special-in-odt/22180/2 "2022-04-13T22:28:45Z")

</div>

Hi

I think you enable " WYSIWYG editor " module and use it in product .  
Yoy will see a warning about use it in products details lines .

---

<div class="post-metadata">

**Author:** ![farneyaurelio](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/farneyaurelio/32/6313_2.png) [@farneyaurelio](https://www.dolibarr.org/forum/u/farneyaurelio)\
**Post date:** [April 14, 2022, 12:55pm UTC](https://www.dolibarr.org/forum/t/problem-with-character-special-in-odt/22180/3 "2022-04-14T12:55:05Z")

</div>

> [@trekmorris](#):
>
> o usa no produto.  
> Yoy verá um aviso sobre usá-lo nas linhas de detalhes dos pro

Good Morning Trekmorris,

I believe this is not the problem. I noticed that when I modify the text of the product in the contract module, the text is different from what is displayed (see the figure below). The same does not happen in the budget module.

![image](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/d/d23e57e45edd1fa93bc40a4ec041fbabeffb1a0c.png)

Is there any text change in the transition between these modules?

---

<div class="post-metadata">

**Author:** ![trekmorris](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/t/dfb087/32.png) [@trekmorris](https://www.dolibarr.org/forum/u/trekmorris)\
**Post date:** [April 14, 2022, 3:00pm UTC](https://www.dolibarr.org/forum/t/problem-with-character-special-in-odt/22180/4 "2022-04-14T15:00:11Z")

</div>

Hi

Or maybe you could try to disable "WYSIWIG creation/edition of the field description of products/services " , then create a new product to see if the problem fixed .

I have same issue before , so i disable it .

---

<div class="post-metadata">

**Author:** ![farneyaurelio](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/farneyaurelio/32/6313_2.png) [@farneyaurelio](https://www.dolibarr.org/forum/u/farneyaurelio)\
**Post date:** [April 14, 2022, 4:56pm UTC](https://www.dolibarr.org/forum/t/problem-with-character-special-in-odt/22180/5 "2022-04-14T16:56:12Z")

</div>

> [@trekmorris](#):
>
> você possa tentar desabilitar “criação/edição WYSIWIG do campo descrição de produtos/serviços” e criar um novo produto para ver se o problema foi corrigido.
> 
> Eu tenho o mesmo problema antes, então eu desabilitei.

So I disabled it here and still the same thing. But we believe that I do not believe right. I confirmed here if I delete the service and include it again within the contract module this problem does not happen. The problem of duration is when the service line cloning is done.

---

<div class="post-metadata">

**Author:** ![ksar](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/ksar/32/514_2.png) [@ksar](https://www.dolibarr.org/forum/u/ksar)\
**Post date:** [April 14, 2022, 8:19pm UTC](https://www.dolibarr.org/forum/t/problem-with-character-special-in-odt/22180/6 "2022-04-14T20:19:15Z")

</div>

Hello,

This is also not normal ![image](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/4/47929062680d17dd2b236d7e0e54503d6e13e086.png)  
You have an issue on your server configuration.  
Something is not in UTF-8

---

<div class="post-metadata">

**Author:** ![farneyaurelio](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/farneyaurelio/32/6313_2.png) [@farneyaurelio](https://www.dolibarr.org/forum/u/farneyaurelio)\
**Post date:** [May 5, 2022, 6:05pm UTC](https://www.dolibarr.org/forum/t/problem-with-character-special-in-odt/22180/7 "2022-05-05T18:05:50Z")

</div>

> [@ksar](#):
>
> UTF-8

Thanks, I will do a check.

---

<div class="post-metadata">

**Author:** ![farneyaurelio](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/farneyaurelio/32/6313_2.png) [@farneyaurelio](https://www.dolibarr.org/forum/u/farneyaurelio)\
**Post date:** [July 28, 2022, 5:35pm UTC](https://www.dolibarr.org/forum/t/problem-with-character-special-in-odt/22180/8 "2022-07-28T17:35:09Z")

</div>

Hello guys,

I still have this problem before. In my research I see that there is no trivial solution as commented on [Dolibarr v.13 prints special characters in .odt files - #13 by farneyaurelio](https://www.dolibarr.org/forum/t/dolibarr-v-13-prints-special-characters-in-odt-files/20199/13).

In view of this, in the hope of one day solving this issue, I am correcting the texts exported in .odt in word itself with the help of a macro. I put the schedule below to help other people if they need it.

Sub Correção\_UTF8()  
’  
’ Correção\_UTF8 Macro  
’  
’  
Selection.Find.ClearFormatting  
Selection.Find.Replacement.ClearFormatting  
With Selection.Find  
.Text = “ç”  
.Replacement.Text = “ç”  
.Forward = True  
.Wrap = wdFindAsk  
.Format = False  
.MatchCase = False  
.MatchWholeWord = False  
.MatchWildcards = False  
.MatchSoundsLike = False  
.MatchAllWordForms = False  
End With  
Selection.Find.Execute Replace:=wdReplaceAll

```
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
    .Text = "&Ccedil;"
    .Replacement.Text = "Ç"
    .Forward = True
    .Wrap = wdFindAsk
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
    .Text = "&aacute;"
    .Replacement.Text = "á"
    .Forward = True
    .Wrap = wdFindAsk
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
    .Text = "&Aacute;"
    .Replacement.Text = "Á"
    .Forward = True
    .Wrap = wdFindAsk
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
    .Text = "&eacute;"
    .Replacement.Text = "é"
    .Forward = True
    .Wrap = wdFindAsk
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
    .Text = "&Eacute;"
    .Replacement.Text = "É"
    .Forward = True
    .Wrap = wdFindAsk
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
    .Text = "&iacute;"
    .Replacement.Text = "í"
    .Forward = True
    .Wrap = wdFindAsk
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
    .Text = "&oacute;"
    .Replacement.Text = "ó"
    .Forward = True
    .Wrap = wdFindAsk
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
    .Text = "&uacute;"
    .Replacement.Text = "ú"
    .Forward = True
    .Wrap = wdFindAsk
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
    .Text = "&Uacute;"
    .Replacement.Text = "Ú"
    .Forward = True
    .Wrap = wdFindAsk
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
    .Text = "&acirc;"
    .Replacement.Text = "â"
    .Forward = True
    .Wrap = wdFindAsk
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
    .Text = "&Acirc;"
    .Replacement.Text = "Â"
    .Forward = True
    .Wrap = wdFindAsk
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
    .Text = "&ecirc;"
    .Replacement.Text = "ê"
    .Forward = True
    .Wrap = wdFindAsk
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
    .Text = "&ocirc;"
    .Replacement.Text = "ô"
    .Forward = True
    .Wrap = wdFindAsk
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
    .Text = "&Ocirc;"
    .Replacement.Text = "Ô"
    .Forward = True
    .Wrap = wdFindAsk
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
    .Text = "&atilde;"
    .Replacement.Text = "ã"
    .Forward = True
    .Wrap = wdFindAsk
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
    .Text = "&otilde;"
    .Replacement.Text = "õ"
    .Forward = True
    .Wrap = wdFindAsk
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
    .Text = "<br>"
    .Replacement.Text = ""
    .Forward = True
    .Wrap = wdFindAsk
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll

```

Selection.Find.ClearFormatting  
Selection.Find.Replacement.ClearFormatting  
With Selection.Find  
.Text = ““”  
.Replacement.Text = “”“”  
.Forward = True  
.Wrap = wdFindAsk  
.Format = False  
.MatchCase = False  
.MatchWholeWord = False  
.MatchWildcards = False  
.MatchSoundsLike = False  
.MatchAllWordForms = False  
End With  
Selection.Find.Execute Replace:=wdReplaceAll

```
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
    .Text = "&rdquo;"
    .Replacement.Text = """"
    .Forward = True
    .Wrap = wdFindAsk
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll

```

End Sub

---

<div class="post-metadata">

**Author:** ![ksar](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/ksar/32/514_2.png) [@ksar](https://www.dolibarr.org/forum/u/ksar)\
**Post date:** [July 28, 2022, 5:42pm UTC](https://www.dolibarr.org/forum/t/problem-with-character-special-in-odt/22180/9 "2022-07-28T17:42:59Z")

</div>

Hello,

> [@farneyaurelio](#):
>
> Thanks, I will do a check.

And ? Have you checked ?

---

<div class="post-metadata">

**Author:** ![farneyaurelio](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/farneyaurelio/32/6313_2.png) [@farneyaurelio](https://www.dolibarr.org/forum/u/farneyaurelio)\
**Post date:** [July 28, 2022, 6:27pm UTC](https://www.dolibarr.org/forum/t/problem-with-character-special-in-odt/22180/10 "2022-07-28T18:27:40Z")

</div>

Hi Ksar, yes i checked. I made the correction on the server but the problem remains. What amazes me the most is that if the product or service is inserted directly into the module, this problem does not happen. For example, if you import a service “x” from the quote into the contract, the error appears. However, if I add this service to the same contract, the text appears correctly.
