Jump to content
ptomter

Whmcs not pass data correct

Recommended Posts

1) Whmcs = UTF-8
2) Databaese= UTF-8

When passing information from clients to custom modules its not UTF-8

Example Ø = O and Æ = AE etc.

Custom module file = UTF-8, but its the passing information from WHMCS to the custom module the letters are changed.

Share this post


Link to post
Share on other sites

How are you "passing information from WHMCS to the custom module" specifically ?  Code examples goes miles. 

Share this post


Link to post
Share on other sites

Got it to work but had to put ["original"] before .

".$params["original"]["state"]."

Then its passed without any mapping from WHMCS side.

 

 

Share this post


Link to post
Share on other sites

Data passed to the $params parameter will see all of the non-latin characters transliterated to their latin counterparts. This is done because some registrars will return errors should they receive a non-latin character. You can read some about this at https://docs.whmcs.com/Custom_Transliteration

As you have discovered, the original (non-transliterated) data is stored in the ['original'] array so you can have your registrar module access that via $params['original'] instead.

Share this post


Link to post
Share on other sites
34 minutes ago, WHMCS Nathan said:

Data passed to the $params parameter will see all of the non-latin characters transliterated to their latin counterparts. This is done because some registrars will return errors should they receive a non-latin character. You can read some about this at https://docs.whmcs.com/Custom_Transliteration

As you have discovered, the original (non-transliterated) data is stored in the ['original'] array so you can have your registrar module access that via $params['original'] instead.


Thank you Nathan for your feedback. Highly appriciate it. I knew that this where done in parts of WHMCS but didn knew that this was also done when passing information from clients to custom modules also. Been around some years so I remembered the [orginal] from a ticket many years ago .. as I cant see its a part of the documentation ?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated