Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register


0
(click on this box to dismiss)

node.js 연동시 한글깨짐

var http = require('http');

var fs = require('fs');

var socketio = require('socket.io');

 

var CUBRID = require('node-cubrid');

var CUBRIDClient = CUBRID.createCUBRIDConnection('114.200.***.***', 33000, '***', '***', '***');

 

 

//웹서버를 만듭니다.

var server = http.createServer(function (request , response){

var id = '';

var nm = '';

CUBRIDClient.connect(function () {

 CUBRIDClient.query('select stf_id,stf_name  from ***', function (err, result, queryHandle) {

   var arr = CUBRID.Result2Array.RowsArray(result);

 

   var stf_id = new Array();

  

   for (var j = 0; j < arr.length; j++) {

    //console.info(arr[j].toString());

    stf_id.push(arr[0].toString());

   

   }

   

  // console.info(stf_id);

   

   console.info(stf_id[0].split(',')[1]);

   id = stf_id[0];

   

   CUBRIDClient.closeQuery(queryHandle, function () {

     CUBRIDClient.close(function () {

 

     });

   });

 });

});

 

    console.info(stf_id[0].split(',')[1]); 이부분 한글이 자꾸 깨집니다. 어떻게 처리해야 할까요?.. 답이 안나오네요;;

link comment (0)
asked 10 months ago
tjck016
1
No answers
tagged




You are either using a very old browser or a browser that is not supported.
In order to browse cubrid.org you need to have one of the following browsers:



Internet Explorer: Mozilla Firefox: Google Chrome: