Hi all.
I'm having problems with сyrillic in Drive
From the Zimbra to NextCloud the cyrillic alphabet is transmitted as "?"
This happens both with a record in the MySQL, and with the names of the folders
If I edit record in MySQL in the NextCloud server - Drive in Zimbra show cyrillic without errors.
How can I tell a Zimbra that the transfer should go in the encoding of "UTF-8"
Any ideas?
Problem with cyrillic
Re: Problem with cyrillic
Hi,
same problem on NextCloud 12.0.0
same problem on NextCloud 12.0.0
-
- Posts: 1
- Joined: Tue May 22, 2018 12:14 pm
Re: Problem with cyrillic
My colleague Dominique found and solve this problem:
If the user has an accent in data, the json_decode return NULL and the
user can not be authenticated.
Correction :
/var/www/html/nextcloud/apps/zimbradrive/lib/auth/zimbraauthenticationbackendimpl.php
public function getZimbraUser($uid, $password)
{
$httpRequestResponse =
$this->doZimbraAuthenticationRequest($uid, $password);
if (200 !== $httpRequestResponse->getHttpCode())
{
throw new AuthenticationException();
}
$contents = $httpRequestResponse->getRawResponse();
$contents = utf8_encode($contents);
$response = json_decode($contents);
//$response = json_decode($httpRequestResponse->getRawResponse());
$userId = $response->{'accountId'};
$userDisplayName = $response->{'displayName'};
$userEmail = $response->{'email'};
$this->assertNotEmpty($userId, $userDisplayName, $userEmail);
return new ZimbraUser($userId, $userDisplayName, $userEmail);
}
Try to edit this.
If the user has an accent in data, the json_decode return NULL and the
user can not be authenticated.
Correction :
/var/www/html/nextcloud/apps/zimbradrive/lib/auth/zimbraauthenticationbackendimpl.php
public function getZimbraUser($uid, $password)
{
$httpRequestResponse =
$this->doZimbraAuthenticationRequest($uid, $password);
if (200 !== $httpRequestResponse->getHttpCode())
{
throw new AuthenticationException();
}
$contents = $httpRequestResponse->getRawResponse();
$contents = utf8_encode($contents);
$response = json_decode($contents);
//$response = json_decode($httpRequestResponse->getRawResponse());
$userId = $response->{'accountId'};
$userDisplayName = $response->{'displayName'};
$userEmail = $response->{'email'};
$this->assertNotEmpty($userId, $userDisplayName, $userEmail);
return new ZimbraUser($userId, $userDisplayName, $userEmail);
}
Try to edit this.