ptomter Posted March 5, 2019 Share Posted March 5, 2019 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. 0 Quote Link to comment Share on other sites More sharing options...
steven99 Posted March 6, 2019 Share Posted March 6, 2019 How are you "passing information from WHMCS to the custom module" specifically ? Code examples goes miles. 0 Quote Link to comment Share on other sites More sharing options...
ptomter Posted March 6, 2019 Author Share Posted March 6, 2019 I use the default WHMCS module paramters. https://developers.whmcs.com/domain-registrars/module-parameters/ Example: <contact:street>".$params["fullstate"]."</contact:street> Where fullstate= Some name with charchers norwegian letters ÆØÅ that turnes into AE, O and A when its passed on to the external system! 0 Quote Link to comment Share on other sites More sharing options...
ptomter Posted March 6, 2019 Author Share Posted March 6, 2019 Similar problem as this guy had in 2010 - 0 Quote Link to comment Share on other sites More sharing options...
ptomter Posted March 6, 2019 Author Share Posted March 6, 2019 Got it to work but had to put ["original"] before . ".$params["original"]["state"]." Then its passed without any mapping from WHMCS side. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Developer WHMCS Nathan Posted March 6, 2019 WHMCS Developer Share Posted March 6, 2019 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. 0 Quote Link to comment Share on other sites More sharing options...
ptomter Posted March 6, 2019 Author Share Posted March 6, 2019 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 ? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.