Short issue description: If you see errors in console when you run
lvectl paneluserslimits --json
and some other commands, or in WHM - LVE Manager like this:
Traceback (most recent call last): File "/usr/sbin/lvectl", line 707, in <module> main() File "/usr/sbin/lvectl", line 598, in main lve_commands.paneluserslimits() File "/opt/alt/python27/lib/python2.7/site-packages/lvectllib.py", line 830, in paneluserslimits result += formatter(user) File "/opt/alt/python27/lib/python2.7/site-packages/lvectllib.py", line 774, in wrapper lve_apply(user, plan_id=package, reseller=reseller, result=True) File "/opt/alt/python27/lib/python2.7/site-packages/lvectllib.py", line 603, in lve_apply reseller = guess_reseller_by_package (plan_id) File "/opt/alt/python27/lib/python2.7/site-packages/lvectllib.py", line 1828, in guess_reseller_by_package package = package.decode('utf-8') File "/opt/alt/python27/lib64/python2.7/encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode byte 0xf1 in position 13: unexpected end of data
This means that your browser encoding was not set to UTF-8 during the package creation, and it was saved with gibberish symbols. Next, when the package is assigned to one or more users, you will see the error listed above. For example:
- Your browser has ISO-8859-6 encoding set, and you create a package with some non-ASCII symbols (cyrillic in this case):
- Next, you create a new user and assign the package to that user:
If you look at such user in the console, it usually looks as follows:
# cat /var/cpanel/users/username BACKUP=1 BWLIMIT=unlimited CONTACTEMAIL= ….. OWNER=root PLAN=п�&#65533;�&#65533;�&#65533;т�&#65533;щ�&#65533;
The last line “PLAN=...” means which package is assigned to the user, and as you can see in the example above, the line contains gibberish symbols.
cPanel only supports UTF-8 encodings and they have no plans to change that, so the PLAN= line with gibberish symbols must be manually changed to the corresponding plan, i.e. it should look like this: PLAN=пакетище
Fix the browser encoding to use one compatible with UTF-8. Since UTF-8 became the standard for all data on the Internet in 2009 the primary browsers (Internet Explorer/Edge, Firefox, Chrome, Safari) provide language encodings compatible with UTF-8.