Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converting UTF-8 result to UTF-8 #290

Open
edrobal opened this issue Jul 20, 2016 · 10 comments
Open

Converting UTF-8 result to UTF-8 #290

edrobal opened this issue Jul 20, 2016 · 10 comments

Comments

@edrobal
Copy link

edrobal commented Jul 20, 2016

Superfecta convert to UTF-8 an UTF-8 result.
Example:
Executing LocalTel CH
Searching Local.ch...
'JV Jura Voyages Sàrl'
result took 0.0661 seconds.
Text is good.
Converting result to UTF-8
This scheme would set the caller id to: JV Jura Voyages S?rl
Text is no more good.

@rodrigoscoelho
Copy link

Same problem here. Please fix it...

@chriszuercher
Copy link
Contributor

I had a similar issue but with Cache and local.ch module. For me moving to UTF8 conversion more upwards in code helped and it works. See my Pull request here: #284 it was so far not integrated in the code so you need to apply it by yourself.

@edrobal
Copy link
Author

edrobal commented Oct 14, 2016

Hello

I think that the best is to add an option for converting or
not the result for each module or to define if the result is
UTF8.

Regards.

Le 14. 10. 16 à 10:49, chriszuercher a écrit :

I had a similar issue but with Cache and local.ch module.
For me moving to UTF8 conversion more upwards in code
helped and it works. See my Pull request here: #284
#284
it was so far not integrated in the code so you need to
apply it by yourself.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#290 (comment),
or mute the thread

Christian Laborde

GTS - Informatique
Une division de GTS Global Travel Services SA

+41 21 799 54 57

Place de la Gare 4
CH 1096 Cully
Suisse

@edrobal
Copy link
Author

edrobal commented Nov 17, 2016

is there a pilot in the plane ?????

@edrobal edrobal closed this as completed Nov 17, 2016
@rodrigoscoelho
Copy link

I don't know about a pilot, but at least there is passenger on it..

Email enviado usando um celular....

Em 17 de nov de 2016 07:50, "Christian Laborde" [email protected]
escreveu:

is there a pilot in the plane ?????


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#290 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGl5mrYI082dcDKnRxN0_hlLfWAyB2xnks5q_CNsgaJpZM4JQu-C
.

@edrobal edrobal reopened this Jan 22, 2017
@edrobal
Copy link
Author

edrobal commented Jan 22, 2017

Why is this issue closed ? This error is always existing.

@code-chicken
Copy link

code-chicken commented Nov 28, 2017

I am also still having this error. Especially the data from Google Contacts is in UTF8 by default, so converting the data again doesn't make sense.
For testing I disabled all modules except Google Contacts and still got names with broken umlauts.

@clst
Copy link

clst commented Mar 20, 2018

In my FreePBX the pull request referenced above was merged already. But the $superfecta->stripAccents function seems to munge all accented characters to some uppercase non-accented version.
I commented out that line with no adverse effects so far:
$callerid = $superfecta->stripAccents($callerid);

I do not recommend anyone doing that without looking into it first. I might have possibly broken something by doing that.

@edrobal
Copy link
Author

edrobal commented May 29, 2018

Yes I solve also my problem when I commented the same line. But I need also to comment _utf8_decode on superfecta_single because local.ch respond in utf8 and superfecta convert badly in this case.
And evidently I must avoid any superfecta upgrade.

@clst
Copy link

clst commented Jun 5, 2018

You might also get more trouble because substr in this line:
$callerid = substr($callerid, 0, 40);
does not care about multi byte characters and will sometimes break the whole string.

I don't have a proper fix yet, because my custom http CID Lookup will sometime interfere with Superfecta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants