반응형

ASP 인코딩


* 페이지 속성을 정의


 <%@ codepage="65001" language="VBSCRIPT" %>

 

 0 - ANSI(default)
 949 - 한국어(EUC-KR)
 65001 - 유니코드(UTF-8)
 65535 - 유니코드(UTF-16)

 

* 메타태그 설정

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" >

 

* 현재 세션사용자의 동적 텍스트 인코딩 코드 설정

 

    Session.CodePage = 65001
    Session.CodePage = 949

 

* ASP의 response.charset을 이용해서 문자코드 세트명 지정

 

    Response.Charset = "EUC=KR"

 

 

* UTF-8 인데 계속 한글이 깨지면 아래와 같이 다 적용해보자.

 

<%@Language="VBScript" CODEPAGE="65001" %>
<%
    Session.CodePage = 65001

    Response.CharSet = "UTF-8"
   

 

 

<%@  codepage="949" language="VBScript" %><% 
'session.codepage = 65001  ' codepage="949" language 
Session.CodePage = 949 
'Response.expires=-1 
Response.ContentType = "application/json" 
Response.Charset = "euc-kr" 
'Response.Charset = "utf-8" 

 

 

 

* utf-8로 만들기 : 페이지 최상단에 입력

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
Response.AddHeader "Cache-Control", "no-cache"
Response.AddHeader "Expires", "0"
Response.AddHeader "Pragma", "no-cache"
Response.ContentType = "text/html; charset=utf-8"
%

 

 

 

 

 

반응형
반응형
<br>전송방식 : <%=Request.ServerVariables ("REQUEST_METHOD")%>
< br>IP주소 : <%=Request.ServerVariables ("REMOTE_ADDR")%>
< br>브라우저정보 : <%=Request.ServerVariables ("HTTP_USER_AGENT")%>
< br>로그온ID : <%=Request.ServerVariables ("LOGON_USER")%>
< %'윈도우 인증으로 로그인이 된 경우의 사용자 아이디를 보여줌%>
<hr>
< br>서버 포트 : <%=Request.ServerVariables ("SERVER_PORT")%>
< br>웹 서버 : <%=Request.ServerVariables ("SERVER_SOFTWARE")%>

<br>호스트 : <%=Request.ServerVariables("http_host")%>
< br>호스트 뒤(iis home directory) 주소받기 : <%=Request.ServerVariables("PATH_INFO")%>
< br>쿼리 스트링: <%=Request.ServerVariables ("QUERY_STRING")%>
< br>리퍼러 체크 : <%=Request.ServerVariables("HTTP_REFERER")%>


< br>Full URL : http://<%=Request.ServerVariables("http_host")%><%=Request.ServerVariables("PATH_INFO")%><%=Request.ServerVariables ("QUERY_STRING")%>

 

반응형

'프로그래밍 > Web' 카테고리의 다른 글

Why Does Angular.js Rock?  (0) 2013.08.13
git - 간편 안내서  (0) 2013.08.12
[Erlang] Erlang & Aptana Install  (0) 2013.07.31
[HTML] Build an HTML Email Template From Scratch  (0) 2013.07.30
Daux.io — Generate documentation with Markdown  (0) 2013.07.30
반응형

날짜 - reg_day

 

현재 날짜 : getdate()  -> select getdate()

 

select convert(VARCHAR, reg_day, 120)

-> 날짜를 문자형(varchar)으로 변환

 

CAST, dateadd(), datediiff() 등이 있다.

 

반응형
반응형

1. <% @CODEPAGE="65001" language="VBScript" %>
 
코드 페이지는 숫자, 구두점, 기타 그림 문자 등을 포함하는 문자 집합이다.
각 언어와 로케일마다 다른 코드 페이지를 사용한다.
 
대표적인 코드 페이지 값
949   : 한국어 (EUC-KR)
65001 : 유니코드 (UTF-8)
 
 
ASP에서 코드 페이지를 지정하기 위해서는 Session.CodePage 프로퍼티나 @CODEPAGE 명령어를 사용한다.
결과는 같지만 적용범위의 차이가 있다.
 
Session.CodePage 프로퍼티를 이용해서 코드 페이지를 지정하면 세션 범위 내에서 실행되고 있는 모든 스크립트에 적용되지만, @CODEPAGE를 사용하면 지정한 페이지에만 영향을 미치게 된다.

 
페이지 상단에 @CODEPAGE를 지정하여 해당 페이지 전체에 적용하거나,
코드 중간에 Session.CodePage 프로퍼티를 지정하여 동적으로 설정할 수 있다.
 

2. Session.CodePage = 65001
현재 세션의 동적 코드 페이지 설정.
스크립트 일부분에서 외국어로 된 문장을 출력하려면 코드 페이지를 일시적으로 출력할 외국어의 코드 페이지로 변경하여 출력 후 원래의 코드 페이지 값으로 복원해주면 된다.
 
3. Response.CharSet = "UTF-8"
문자 집합 이름을 응답 개체의 content-type 헤더에 추가한다.
 
4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 해당 페이지의 (HTML,ASP,JSP,PHP 등) 정보를 가지고 있는 메타 태그를 설정.
 
5. 에디트플러스 등으로 저장할 때 반드시 해당 Encoding 방식으로 저장한다.
65001 일땐 필히 UTF-8로 저장해야함.

반응형
반응형
APTANA plugin - Syntax HighLighter

 

http://colorer.sourceforge.net/eclipsecolorer/

 

 

 

* APTANA에서 추가.

  [Help] - [Install New Software] - [Add]

  

 

Eclipse platform plugin

EclipseColorer is based on a native Colorer-take5 library, so each platform has its own native part library. By default the package contains plugin's stuff compiled for win32, Linux(x86 and x86_64) and MacOS (ppc and x86 platforms).

Features

  • Enchanced and fixed word wrapping mode.
  • Automatic folding support for mostly all (200+) supported languages
  • Per-type customizable color schemas and editor parameters.
  • Automatic errors and todo comments annotation.
  • Paired constructions highlighting and matching.
  • Shortcuts for pairs matching.
  • Different color schemes.
  • Replacement of tabs with spaces option.
  • Choosing of currently used syntax mode in editor (list of all available types).
  • Dynamic library reloading.
  • Powerful and flexible outliner for all common languages.
  • Errors list is included into the outliner view.
  • Colored sources generation into HTML files (Available in the navigator's context menu).
  • Find more in screenshots section.
반응형

+ Recent posts