Jump to content

Logicbox Error With Utf-8 Caractere


activa

Recommended Posts

we have some trouble in registering new domain , the module retur a rror message

https://httpapi.com/api/domains/register.json
{"status":"ERROR","message":"Required parameter missing: reg-contact-id"}

after a profound look ,we have found that logixbox reject adding contact with illegal caractere , the dresss contain "N°"  . and logicbox only acept ascii caractere . no utf-8 caractere .

https://httpapi.com/api/contacts/add.json
{"status":"ERROR","message":"{address1\u003daddress1 contains invalid characters.}"}
Link to comment
Share on other sites

logicbox does not support utf8 caractere . and the adress lenth maximum is 64 .

 

so in logicbox module find

elseif ($key == "address-line-1")
      $vars[$key] = $client->address1;

replace it by

elseif ($key == "address-line-1") {
      $client->address1 = str_replace("NÂ", "N", $client->address1);
      $client->address1 = str_replace("°", ":", $client->address1);
      $client->address1 =  strtr($client->address1,utf8_decode("ÀÁÂÃÄÅàáâãäåÒÓÔÕÖØòóôõöøÈÉÊËèéêëÇçÌÍÎÏìíîïÙÚÛÜùúûüÿÑñ°º"),"aaaaaaaaaaaaooooooooooooeeeeeeeecciiiiiiiiuuuuuuuuynn::");
      $vars[$key] = substr($client->address1, 0, 63);
     }

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...