Site structure
Version 7.x > Site structure > "1 is not a supported code page" View modes: 
User avatar
Member
Member
Dan - 1/9/2013 3:46:40 PM
   
"1 is not a supported code page"
Basically my site won't load (including the CMS Admin and Site Admin sites). It hangs up whenever HTMLHelper calls Encode. I'm assuming it's a value somewhere in the database that got corrupted.

What happened was that I was passing Devanagari characters into a custom table manually with an SQL UI. Now I didn't get any errors, but my first code attempt contained an _UTF8' ' casting (a mysql/ mssql mix up), and didn't work. The next code phrase I put in correctly (with N'') worked and the table updated with the proper values. (The Custom Table interface really needs to allow editing in new window so you don't have to resort the records each and every edit)

In any event, is there a value in the database/caches/wherever that .Net is getting or inferring the code page value from?

User avatar
Member
Member
Dan - 1/10/2013 8:26:05 AM
   
RE:"1 is not a supported code page"
Interesting enough, the problem sorted itself out. Don't ask me how it happened or why it works now... ghost in the machine. (I'm assuming it was a server/.net hiccup)

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 1/10/2013 10:05:06 AM
   
RE:"1 is not a supported code page"
Hi Dan,

thanks for the additional information. I'm glad that it is working now. After a complex changes, sometimes is also good to restart a server... it's a magic :)

Best regards,
Martin Danko

User avatar
Member
Member
Dan - 1/10/2013 10:18:18 AM
   
RE:"1 is not a supported code page"
Well we've isolated the problem. It is indeed whenever we manually (via an SQL UI) add hindi text (or possibly any other text) to our custom table.

Haven't tried a server restart (hardware) because there are multiple important sites running, but I have restarted the website service as well as the app-pool.

I have successfully inserted text in the same manner before upgrading from 6 to 7 + hotfixing, but that was also Korean Hangul rather than Devanagari and there wasn't mixed english text with it.

Worst case I can still edit entries through the CMS (I hope!). If not, I can ask the server admin to do a hardware reboot.

User avatar
Member
Member
Dan - 1/10/2013 2:25:21 PM
   
RE:"1 is not a supported code page"
Okay... the problem occurs even when I enter Devanagari in the CMS custom table insert tool/module. For whatever reason, anything already in the database is fine, but any new entries will cause the above error.

It looks like an error involving unzipping files (cache I assume)/
http://www.cityssm.on.ca/Forms/codepage_error_screenshot.png
http://www.cityssm.on.ca/Forms/codepage_error2_screenshot.png

User avatar
Member
Member
Dan - 1/11/2013 9:26:46 AM
   
RE:"1 is not a supported code page"
On your earlier suggestion: I did arrange to have the server rebooted, and the problem persisted.

However, If I insert
ICSharpCode.SharpZipLib.Zip.ZipConstants.DefaultCodePage = 850;
before any given error line, it corrects the problem.

However, without knowing the original coding or rather the context of the zipping code, this could be at best a bandage fix. (Eg should the code be hitting the default value or should it be detecting it some other way? or should the default value be something other than 1 and does it get changed somehow?)

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 1/21/2013 9:05:08 AM
   
RE:"1 is not a supported code page"
Hi Dan,

I've discussed your issue with our developers and it seems that this behaviour could be caused by your system settings. As I know the SharpZibLib is 3rd party utility, so maybe it will be good to ask them directly. Eventually you can check what is returning this property or if it is possible to override its behaviour via web.config.

Best regards,
Martin Danko

User avatar
Member
Member
Dan - 1/21/2013 8:18:59 PM
   
RE:"1 is not a supported code page"
Thanks for the reply. Yeah, I came across a few cases of the same problem on other forums. I figure it could be a .net thing (maybe the server isn't running a new enough version of the framework). I managed to correct the problem by setting the default page code manually within a custom macro loader (a duct tape solution but it works)

If I'm able to isolate the exact cause in the future, I'll be sure to update you guys for future reference.

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 2/3/2013 9:07:13 AM
   
RE:"1 is not a supported code page"
Hi Dan,

Thanks for letting us know. If you have a custom fix/solution for this feel free to post it here... It might help somebody else in the future.

Anyway, it's really good to hear that you have found workaround!

Best regards,
Martin Danko