Friday, September 7, 2012

use chinese character in asp page

to save chinese character to database that already supported:

INSERT INTO dbo.YourTable(NVarcharColumn)
    VALUES(N'Some Chinese text here')

to retrieve it into asp classic page: 
Response.ContentType = "text/html"
Response.AddHeader "Content-Type", "text/html;charset=UTF-8"
Response.CodePage = 65001
Response.CharSet = "UTF-8" 

Tuesday, August 14, 2012

Safari cannot load java applet


This error appear when opening java applet in Safari, but other browsers are working fine.
"Java is Unavailable or Not Installed. Do you want to go to a page where you can download java?"

and this error message pop up:
"The Java Runtime Environment cannot be loaded from <C:\PROGRA~2\Oracle\JAVAFX~1.1RU\bin\server\jvm.dll>”

How to solve it (on Windows 7):
1. Open Regedit in this location: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Plug-in.
2. There you can find 2 folders, in my PC is was: 10.5.0 and 10.5.1
and there you can find a reference to the path "C:\\Program Files (x86)\\Oracle\\JavaFX 2.1 Runtime".
3. back up the registry by Exporting the "10.5.1" key (folder).
4. Delete that key ("10.5.1").
5. close all Safari browser, then reopen and try again.

^^v