이태화

디자인 전면 수정

Showing 283 changed files with 4309 additions and 42 deletions
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>frontend-builder</title><link href=/static/css/app.9c1481e58089fca544cb9a55e89dba24.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.2ae2e69a05c33dfc65f8.js></script><script type=text/javascript src=/static/js/vendor.7c229c2b77c6a7c173c8.js></script><script type=text/javascript src=/static/js/app.2c5def33d894c5601428.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>frontend-builder</title><link href=/static/css/app.cc5e57333bb9f326857db371c51764e8.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.2ae2e69a05c33dfc65f8.js></script><script type=text/javascript src=/static/js/vendor.7c229c2b77c6a7c173c8.js></script><script type=text/javascript src=/static/js/app.f1152f72778f01704bba.js></script></body></html>
\ No newline at end of file
......
{"version":3,"sources":["app.9c1481e58089fca544cb9a55e89dba24.css"],"names":[],"mappings":"AACA,WACE,sBAAyB,CACzB,6CACF,CACA,KACI,sBAAuB,CACvB,QAAS,CACT,kBACJ,CACA,EACI,oBAAqB,CACrB,aACJ,CACA,GACI,eACJ,CAIA,aACI,WACJ,CACA,GACI,SACJ,CACA,MACE,eAAe,CACf,mBAAoB,CACpB,mBAAoB,CACpB,YAAa,CACb,uBAAwB,CACpB,oBAAqB,CACjB,sBACV,CAEA,OACE,YAAa,CACb,qBACF,CAEA,YACE,iBAAkB,CAClB,WAAY,CACZ,SAAU,CACV,WAAY,CACZ,YAAa,CACb,qBAAuB,CACvB,iBAAkB,CAClB,gDAAqD,CAC7C,wCACV,CACA,uBACE,YAAa,CACb,gBAA2B,CAC3B,WAAY,CACZ,mBAAoB,CACpB,mBAAoB,CACpB,YAAa,CACb,uBAAwB,CACpB,oBAAqB,CACjB,sBACV,CACA,wBAEE,WAAY,CAGZ,iBAIF,CACA,iDATE,cAAe,CAEf,WAAY,CACZ,iBAAkB,CAElB,eAAgB,CAChB,gDAAqD,CAC7C,wCAUV,CARA,yBAEE,WAMF,CACA,+BACE,cACF,CAEA,UACE,WAAY,CACZ,eACF,CACA,GACE,mBAAoB,CACpB,mBAAoB,CACpB,YAAa,CACb,2BAA4B,CAC5B,4BAA6B,CACzB,yBAA0B,CACtB,qBAAsB,CAC9B,kBACF,CACA,GACE,iBACF,CACA,MACE,eAAiB,CACjB,WAAY,CACZ,mBAAoB,CACpB,mBAAoB,CACpB,YAAa,CACb,iBAAkB,CAClB,YAAa,CACb,WAAY,CACZ,iBACF,CACA,YACE,iBAAkB,CAClB,WACF,CACA,MACE,UACF","file":"app.9c1481e58089fca544cb9a55e89dba24.css","sourcesContent":["\n@font-face{\n font-family: 'JejuGothic';\n src: url(/static/fonts/JejuGothic.67e5ae8.ttf);\n}\nbody{\n font-family: JejuGothic;\n margin: 0;\n background: #f2f3f5;\n}\na{\n text-decoration: none;\n color: inherit;\n}\nli{\n list-style: none;\n}\ninput{\n border: none;\n}\nbutton{\n border:none;\n}\nul{\n padding:0;\n}\n.body{\n margin-top:10px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\nheader{\n height: 150px;\n background-color: grey;\n}\n\n.login-menu {\n position: absolute;\n right: 150px;\n top: 200px;\n width: 400px;\n height: 500px;\n background-color: white;\n border-radius: 4px;\n -webkit-box-shadow: 0 15px 30px 0 rgba(0, 0, 0, 0.08);\n box-shadow: 0 15px 30px 0 rgba(0, 0, 0, 0.08);\n}\n.login-menu .input-box {\n height: 400px;\n margin: 50px 25px 50px 25px;\n width: 350px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.login-input-list input {\n font-size: 20px;\n width: 300px;\n height: 50px;\n border-radius: 5px;\n padding-left: 40px;\n margin-top: 20px;\n -webkit-box-shadow: 0 10px 10px 0 rgba(0, 0, 0, 0.08);\n box-shadow: 0 10px 10px 0 rgba(0, 0, 0, 0.08);\n}\n.login-input-list button {\n font-size: 20px;\n width: 345px;\n height: 50px;\n border-radius: 5px;\n margin-top: 20px;\n -webkit-box-shadow: 0 10px 10px 0 rgba(0, 0, 0, 0.08);\n box-shadow: 0 10px 10px 0 rgba(0, 0, 0, 0.08);\n}\n.login-input-list button:hover {\n cursor: pointer;\n}\n\n.imfoList{\n width: 800px;\n background: grey;\n}\nul{\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n margin: 0 auto 10px auto;\n}\nli{\n margin-bottom:5px;\n}\n.item{\n background: white;\n height: 50px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n position: relative;\n padding: 15px;\n width: 800px;\n border-radius:5px;\n}\n.noticeInfo{\n position: absolute;\n bottom:15px;\n}\n.date{\n color: grey;\n}\n"]}
\ No newline at end of file
@font-face{font-family:JejuGothic;src:url(/static/fonts/JejuGothic.67e5ae8.ttf)}body{font-family:JejuGothic;margin:0;background:#f2f3f5}a{text-decoration:none;color:inherit}li{list-style:none}button,input{border:none}ul{padding:0}.body{margin-top:10px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}header{height:150px;background-color:grey}.login-menu{position:absolute;right:150px;top:200px;width:400px;height:500px;background-color:#fff;border-radius:4px;-webkit-box-shadow:0 15px 30px 0 rgba(0,0,0,.08);box-shadow:0 15px 30px 0 rgba(0,0,0,.08)}.login-menu .input-box{height:400px;margin:50px 25px;width:350px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.login-input-list input{width:300px;padding-left:40px}.login-input-list button,.login-input-list input{font-size:20px;height:50px;border-radius:5px;margin-top:20px;-webkit-box-shadow:0 10px 10px 0 rgba(0,0,0,.08);box-shadow:0 10px 10px 0 rgba(0,0,0,.08)}.login-input-list button{width:345px}.login-input-list button:hover{cursor:pointer}.imfoList{width:800px;background:grey}ul{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:0 auto 10px}li{margin-bottom:5px}.item{background:#fff;height:50px;display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;padding:15px;width:800px;border-radius:5px}.noticeInfo{position:absolute;bottom:15px}.date{color:grey}
/*# sourceMappingURL=app.9c1481e58089fca544cb9a55e89dba24.css.map */
\ No newline at end of file
@font-face{font-family:JejuGothic;src:url(/static/fonts/JejuGothic.67e5ae8.ttf)}body{font-family:sans-serif;margin:0;background:#f2f3f5}a{text-decoration:none;color:inherit}li{list-style:none}button,input{border:none}ul{padding:0}.body{margin-top:10px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}header{height:150px;background-color:grey}.login-menu{position:absolute;right:150px;top:200px;width:400px;height:500px;background-color:#fff;border-radius:4px;-webkit-box-shadow:0 15px 30px 0 rgba(0,0,0,.08);box-shadow:0 15px 30px 0 rgba(0,0,0,.08)}.login-menu .input-box{height:400px;margin:50px 25px;width:350px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.login-input-list input{width:300px;padding-left:40px}.login-input-list button,.login-input-list input{font-size:20px;height:50px;border-radius:5px;margin-top:20px;-webkit-box-shadow:0 10px 10px 0 rgba(0,0,0,.08);box-shadow:0 10px 10px 0 rgba(0,0,0,.08)}.login-input-list button{width:345px}.login-input-list button:hover{cursor:pointer}.imfoList{width:800px;background:grey}ul{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin:0 auto 10px}li{margin-bottom:2px}.item{background:#fff;height:32px;display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;padding:6px 15px 18px;width:700px;border-radius:5px}.title{font-size:15px}a{color:#34495e}a:visited{color:grey}.noticeInfo{position:absolute;bottom:12px;font-size:12px}.date{color:grey}.site{color:#fff;font-size:10px;padding:2px 10px}.khu{background-color:#c0392b}.sw{background-color:#3498db}.janghak{background-color:#632300}
/*# sourceMappingURL=app.cc5e57333bb9f326857db371c51764e8.css.map */
\ No newline at end of file
......
{"version":3,"sources":["app.cc5e57333bb9f326857db371c51764e8.css"],"names":[],"mappings":"AACA,WACE,sBAAyB,CACzB,6CACF,CACA,KACI,sBAAuB,CACvB,QAAS,CACT,kBACJ,CACA,EACI,oBAAqB,CACrB,aACJ,CACA,GACI,eACJ,CAIA,aACI,WACJ,CACA,GACI,SACJ,CACA,MACE,eAAe,CACf,mBAAoB,CACpB,mBAAoB,CACpB,YAAa,CACb,uBAAwB,CACpB,oBAAqB,CACjB,sBACV,CAEA,OACE,YAAa,CACb,qBACF,CAEA,YACE,iBAAkB,CAClB,WAAY,CACZ,SAAU,CACV,WAAY,CACZ,YAAa,CACb,qBAAuB,CACvB,iBAAkB,CAClB,gDAAqD,CAC7C,wCACV,CACA,uBACE,YAAa,CACb,gBAA2B,CAC3B,WAAY,CACZ,mBAAoB,CACpB,mBAAoB,CACpB,YAAa,CACb,uBAAwB,CACpB,oBAAqB,CACjB,sBACV,CACA,wBAEE,WAAY,CAGZ,iBAIF,CACA,iDATE,cAAe,CAEf,WAAY,CACZ,iBAAkB,CAElB,eAAgB,CAChB,gDAAqD,CAC7C,wCAUV,CARA,yBAEE,WAMF,CACA,+BACE,cACF,CAEA,UACE,WAAY,CACZ,eACF,CACA,GACE,mBAAoB,CACpB,mBAAoB,CACpB,YAAa,CACb,2BAA4B,CAC5B,4BAA6B,CACzB,yBAA0B,CACtB,qBAAsB,CAC9B,kBACF,CACA,GACE,iBACF,CACA,MACE,eAAiB,CACjB,WAAY,CACZ,mBAAoB,CACpB,mBAAoB,CACpB,YAAa,CACb,iBAAkB,CAClB,qBAAsB,CACtB,WAAY,CACZ,iBACF,CACA,OACE,cACF,CACA,EACE,aACF,CACA,UACE,UACF,CACA,YACE,iBAAkB,CAClB,WAAW,CACX,cACF,CACA,MACE,UACF,CACA,MACE,UAAY,CACZ,cAAc,CACd,gBACF,CACA,KACE,wBACF,CACA,IACE,wBACF,CACA,SACE,wBACF","file":"app.cc5e57333bb9f326857db371c51764e8.css","sourcesContent":["\n@font-face{\n font-family: 'JejuGothic';\n src: url(/static/fonts/JejuGothic.67e5ae8.ttf);\n}\nbody{\n font-family: sans-serif;\n margin: 0;\n background: #f2f3f5;\n}\na{\n text-decoration: none;\n color: inherit;\n}\nli{\n list-style: none;\n}\ninput{\n border: none;\n}\nbutton{\n border:none;\n}\nul{\n padding:0;\n}\n.body{\n margin-top:10px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n\nheader{\n height: 150px;\n background-color: grey;\n}\n\n.login-menu {\n position: absolute;\n right: 150px;\n top: 200px;\n width: 400px;\n height: 500px;\n background-color: white;\n border-radius: 4px;\n -webkit-box-shadow: 0 15px 30px 0 rgba(0, 0, 0, 0.08);\n box-shadow: 0 15px 30px 0 rgba(0, 0, 0, 0.08);\n}\n.login-menu .input-box {\n height: 400px;\n margin: 50px 25px 50px 25px;\n width: 350px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n.login-input-list input {\n font-size: 20px;\n width: 300px;\n height: 50px;\n border-radius: 5px;\n padding-left: 40px;\n margin-top: 20px;\n -webkit-box-shadow: 0 10px 10px 0 rgba(0, 0, 0, 0.08);\n box-shadow: 0 10px 10px 0 rgba(0, 0, 0, 0.08);\n}\n.login-input-list button {\n font-size: 20px;\n width: 345px;\n height: 50px;\n border-radius: 5px;\n margin-top: 20px;\n -webkit-box-shadow: 0 10px 10px 0 rgba(0, 0, 0, 0.08);\n box-shadow: 0 10px 10px 0 rgba(0, 0, 0, 0.08);\n}\n.login-input-list button:hover {\n cursor: pointer;\n}\n\n.imfoList{\n width: 800px;\n background: grey;\n}\nul{\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n margin: 0 auto 10px auto;\n}\nli{\n margin-bottom:2px;\n}\n.item{\n background: white;\n height: 32px;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n position: relative;\n padding: 6px 15px 18px;\n width: 700px;\n border-radius:5px;\n}\n.title{\n font-size:15px;\n}\na{\n color: #34495e;\n}\na:visited{\n color: grey;\n}\n.noticeInfo{\n position: absolute;\n bottom:12px;\n font-size:12px;\n}\n.date{\n color: grey;\n}\n.site{\n color: white;\n font-size:10px;\n padding: 2px 10px;\n}\n.khu{\n background-color: #C0392B;\n}\n.sw{\n background-color: #3498DB;\n}\n.janghak{\n background-color: #632300;\n}\n"]}
\ No newline at end of file
webpackJsonp([1],{"6geT":function(t,e){},AKAA:function(t,e){},NHnr:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=s("7+uW"),i={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("header",[this._v("\n 로고 들어갈 자리\n "),e("br"),this._v("\n 디자이너 구합니다.\n")])}]};var a=s("VU/8")({name:"header",data:function(){return{}}},i,!1,function(t){s("zkZM")},null,null).exports,r=s("mtWM"),o=s.n(r),c={data:function(){return{username:"",password:""}},methods:{login:function(){o.a.post("/api/login",{username:this.username,password:this.password}).then(function(t){"isExist"===t.data&&alert("isExist"),"success"===t.data&&(window.location.href="/")})}}},l={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"login-menu"},[s("div",{staticClass:"input-box"},[s("form",{on:{submit:function(e){return e.preventDefault(),t.login(e)}}},[s("ul",{staticClass:"login-input-list"},[s("li",[s("input",{directives:[{name:"model",rawName:"v-model",value:t.username,expression:"username"}],attrs:{type:"text",placeholder:"USERNAME"},domProps:{value:t.username},on:{input:function(e){e.target.composing||(t.username=e.target.value)}}})]),t._v(" "),s("li",[s("input",{directives:[{name:"model",rawName:"v-model",value:t.password,expression:"password"}],attrs:{type:"password",placeholder:"PASSWORD"},domProps:{value:t.password},on:{input:function(e){e.target.composing||(t.password=e.target.value)}}})]),t._v(" "),t._m(0)])])])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("button",{attrs:{type:"submit"}},[this._v("login")])])}]};var u={el:".noticeList",data:function(){return{noticeList:[]}},components:{},created:function(){this.fetchNoticeList()},methods:{fetchNoticeList:function(){var t=this;o.a.post("/api/fetchNoticeList",{}).then(function(e){console.log(e.data),t.noticeList=e.data})}}},p={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"noticeList"},[s("ul",[t._m(0),t._v(" "),t._m(1),t._v(" "),t._l(t.noticeList,function(e){return s("li",{key:e.date,staticClass:"item"},[s("a",{attrs:{href:e.link}},[s("div",{staticClass:"title"},[t._v(t._s(e.title))])]),t._v(" "),s("div",{staticClass:"noticeInfo"},[s("span",{staticClass:"site"},[t._v(t._s(e.site))]),t._v(" "),s("span",{staticClass:"date"},[t._v(t._s(e.date))])])])})],2)])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("li",{staticClass:"item"},[e("div",{staticClass:"title"},[this._v("[속보] 히나미자와 대 화산폭발사건에 관한 진상규명위원회 편찬중")]),this._v(" "),e("div",{staticClass:"noticeInfo"},[e("span",{staticClass:"site"},[this._v("SW융합대학")]),this._v(" "),e("span",{staticClass:"date"},[this._v("2020-19-20")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("li",{staticClass:"item"},[e("div",{staticClass:"title"},[this._v("[속보] 히나미자와 대 화산폭발사건에 관한 진상규명위원회 편찬중")]),this._v(" "),e("div",{staticClass:"noticeInfo"},[e("span",{staticClass:"site"},[this._v("SW융합대학")]),this._v(" "),e("span",{staticClass:"date"},[this._v("2020-19-20")])])])}]};var d={name:"App",components:{siteHeader:a,loginMenu:s("VU/8")(c,l,!1,function(t){s("AKAA")},null,null).exports,noticeList:s("VU/8")(u,p,!1,function(t){s("6geT")},null,null).exports}},v={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"app"}},[e("siteHeader"),this._v(" "),e("div",{staticClass:"body"},[e("noticeList")],1)],1)},staticRenderFns:[]};var f=s("VU/8")(d,v,!1,function(t){s("X0K6")},null,null).exports,m=s("/ocq");n.a.use(m.a);var _=new m.a({routes:[{path:"/",name:"App",component:f}]});n.a.config.productionTip=!1,new n.a({el:"#app",router:_,axios:o.a,components:{App:f},template:"<App/>"})},X0K6:function(t,e){},zkZM:function(t,e){}},["NHnr"]);
//# sourceMappingURL=app.2c5def33d894c5601428.js.map
\ No newline at end of file
This diff is collapsed. Click to expand it.
webpackJsonp([1],{"7uGk":function(t,e){},AKAA:function(t,e){},NHnr:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=n("7+uW"),i={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("header",[this._v("\n 로고 들어갈 자리\n "),e("br"),this._v("\n 디자이너 구합니다.\n")])}]};var a=n("VU/8")({name:"header",data:function(){return{}}},i,!1,function(t){n("zkZM")},null,null).exports,r=n("mtWM"),o=n.n(r),c={data:function(){return{username:"",password:""}},methods:{login:function(){o.a.post("/api/login",{username:this.username,password:this.password}).then(function(t){"isExist"===t.data&&alert("isExist"),"success"===t.data&&(window.location.href="/")})}}},u={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"login-menu"},[n("div",{staticClass:"input-box"},[n("form",{on:{submit:function(e){return e.preventDefault(),t.login(e)}}},[n("ul",{staticClass:"login-input-list"},[n("li",[n("input",{directives:[{name:"model",rawName:"v-model",value:t.username,expression:"username"}],attrs:{type:"text",placeholder:"USERNAME"},domProps:{value:t.username},on:{input:function(e){e.target.composing||(t.username=e.target.value)}}})]),t._v(" "),n("li",[n("input",{directives:[{name:"model",rawName:"v-model",value:t.password,expression:"password"}],attrs:{type:"password",placeholder:"PASSWORD"},domProps:{value:t.password},on:{input:function(e){e.target.composing||(t.password=e.target.value)}}})]),t._v(" "),t._m(0)])])])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("li",[e("button",{attrs:{type:"submit"}},[this._v("login")])])}]};var l={el:".noticeList",data:function(){return{noticeList:[]}},components:{},created:function(){this.fetchNoticeList()},methods:{fetchNoticeList:function(){var t=this;o.a.post("/api/fetchNoticeList",{}).then(function(e){console.log(e.data),t.noticeList=e.data})}}},p={render:function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"noticeList"},[n("ul",t._l(t.noticeList,function(e){return n("li",{key:e.date,staticClass:"item"},[n("a",{attrs:{href:e.link,target:"_blank"}},[n("div",{staticClass:"title"},[t._v(t._s(e.title))])]),t._v(" "),n("div",{staticClass:"noticeInfo"},["경희대학교 공지사항"==e.site?n("span",{staticClass:"site khu"},[t._v("경희대")]):"소프트웨어 융합대학 공지사항"==e.site?n("span",{staticClass:"site sw"},[t._v("SW융합")]):"경희대학교 장학센터"==e.site?n("span",{staticClass:"site janghak"},[t._v("장학센터")]):t._e(),t._v(" "),n("span",{staticClass:"date"},[t._v(t._s(e.date))])])])}),0)])},staticRenderFns:[]};var d={name:"App",components:{siteHeader:a,loginMenu:n("VU/8")(c,u,!1,function(t){n("AKAA")},null,null).exports,noticeList:n("VU/8")(l,p,!1,function(t){n("7uGk")},null,null).exports}},v={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"app"}},[e("siteHeader"),this._v(" "),e("div",{staticClass:"body"},[e("noticeList")],1)],1)},staticRenderFns:[]};var f=n("VU/8")(d,v,!1,function(t){n("OOxK")},null,null).exports,m=n("/ocq");s.a.use(m.a);var h=new m.a({routes:[{path:"/",name:"App",component:f}]});s.a.config.productionTip=!1,new s.a({el:"#app",router:h,axios:o.a,components:{App:f},template:"<App/>"})},OOxK:function(t,e){},zkZM:function(t,e){}},["NHnr"]);
//# sourceMappingURL=app.f1152f72778f01704bba.js.map
\ No newline at end of file
This diff is collapsed. Click to expand it.
{"version":3,"sources":["webpack:///webpack/bootstrap b95169acc2742d5b1f8c"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,IAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.2ae2e69a05c33dfc65f8.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap b95169acc2742d5b1f8c"],"sourceRoot":""}
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap 2d2a60184a04a2e4bc9f"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","2","exports","module","l","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","p","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAT,EAGAE,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACAhB,OAAAmB,eAAAT,EAAAM,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMAX,EAAAiB,EAAA,SAAAZ,GACA,IAAAM,EAAAN,KAAAa,WACA,WAA2B,OAAAb,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAO,EAAAC,GAAsD,OAAA1B,OAAAC,UAAAC,eAAAC,KAAAsB,EAAAC,IAGtDpB,EAAAqB,EAAA,IAGArB,EAAAsB,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.2ae2e69a05c33dfc65f8.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t2: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 2d2a60184a04a2e4bc9f"],"sourceRoot":""}
\ No newline at end of file
......
......@@ -28,7 +28,7 @@ export default {
src: url('assets/JejuGothic.ttf');
}
body{
font-family: JejuGothic;
font-family: sans-serif;
margin: 0;
background: #f2f3f5;
}
......
<template>
<div class = "noticeList">
<ul>
<li class = "item" >
<div class = "title">[속보] 히나미자와 대 화산폭발사건에 관한 진상규명위원회 편찬중</div>
<div class = "noticeInfo">
<span class = "site">소노자키 일보</span>
<span class = "date">쇼와 69년 7월</span>
</div>
</li>
<li class = "item" >
<div class = "title">[광고] 구합니다.</div>
<div class = "noticeInfo">
<span class = "site">선입금은</span>
<span class = "date">언제나 환영</span>
</div>
</li>
<li class = "item" v-for="notice in noticeList" :key="notice.date">
<a v-bind:href="notice.link"><div class = "title">{{notice.title}}</div></a>
<a v-bind:href="notice.link" target="_blank"><div class = "title">{{notice.title}}</div></a>
<div class = "noticeInfo">
<span class = "site">{{notice.site}}</span>
<span class = "site khu" v-if="notice.site == '경희대학교 공지사항'">경희대</span>
<span class = "site sw" v-else-if="notice.site == '소프트웨어 융합대학 공지사항'">SW융합</span>
<span class = "site janghak" v-else-if="notice.site == '경희대학교 장학센터'">장학센터</span>
<span class = "date">{{notice.date}}</span>
</div>
</li>
......@@ -65,22 +53,47 @@ export default {
margin: 0 auto 10px auto;
}
li{
margin-bottom:5px;
margin-bottom:2px;
}
.item{
background: white;
height: 50px;
height: 32px;
display: flex;
position: relative;
padding: 15px;
width: 800px;
padding: 6px 15px 18px;
width: 700px;
border-radius:5px;
}
.title{
font-size:15px;
}
a{
color: #34495e;
}
a:visited{
color: grey;
}
.noticeInfo{
position: absolute;
bottom:15px;
bottom:12px;
font-size:12px;
}
.date{
color: grey;
}
.site{
color: white;
font-size:10px;
padding: 2px 10px;
}
.khu{
background-color: #C0392B;
}
.sw{
background-color: #3498DB;
}
.janghak{
background-color: #632300;
}
</style>
......
const mysql = require("mysql");
const swuniv = require('./silte_modules/swuniv.js')
const khuuniv = require('./site_modules/KHU')
const swuniv = require('./site_modules/swuniv')
const janghak1 = require("./site_modules/janghak1")
const janghak2 = require("./site_modules/janghak2")
async function loading(){
li = await swuniv.loading();
for(var i = 0; i < li.length;i++){
await insertNotice(li[i]);
}
li = await khuuniv.loading();
for(var i = 0; i < li.length;i++){
await insertNotice(li[i]);
}
li = await janghak1.loading();
for(var i = 0; i < li.length;i++){
await insertNotice(li[i]);
}
li = await janghak2.loading();
for(var i = 0; i < li.length;i++){
await insertNotice(li[i]);
}
}
loading();
var connection = mysql.createConnection({
host: "34.64.183.182",
user: 'root',
......@@ -20,14 +32,6 @@ var connection = mysql.createConnection({
connection.connect();
connection.query('select * from noticeList',function(err,rows){
if(err){
console.log(err);
}
console.log(rows);
})
async function insertNotice(singleNotice){
date = singleNotice.date;
title = singleNotice.title;
......@@ -36,4 +40,7 @@ async function insertNotice(singleNotice){
await connection.query(`insert into noticeList (date, title, link, site) values('${date}','${title}','${link}','${site}')`,function(err){});
}
\ No newline at end of file
}
loading();
......
name: node-iconv
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
os: [macos-latest, ubuntu-16.04, ubuntu-18.04, windows-latest]
node: [10.x, 12.x, 13.x, 14.x]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- name: Node.js ${{matrix.node}}
uses: actions/setup-node@v1
with:
node-version: ${{matrix.node}}
- run: npm install
- run: npm test
env:
CI: true
node-iconv license
==============================================================================
Copyright (c) 2013, Ben Noordhuis <info@bnoordhuis.nl>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
GNU libiconv license
==============================================================================
Copyright (C) 2000-2009, 2011 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
# node-iconv
Text recoding in JavaScript for fun and profit!
## Supported encodings
European languages
ASCII, ISO-8859-{1,2,3,4,5,7,9,10,13,14,15,16},
KOI8-R, KOI8-U, KOI8-RU,
CP{437,737,775,850,852,853,855,857,858,860,861,863,865,866,869}
CP{1125,1250,1251,1252,1253,1254,1257}
Mac{Roman,CentralEurope,Iceland,Croatian,Romania},
Mac{Cyrillic,Ukraine,Greek,Turkish},
Macintosh
Semitic languages
ISO-8859-{6,8}, CP{1255,1256}, CP862, CP864, Mac{Hebrew,Arabic}
Japanese
EUC-JP, SHIFT_JIS, CP932, ISO-2022-JP, ISO-2022-JP-2, ISO-2022-JP-1
EUC-JISX0213, Shift_JISX0213, ISO-2022-JP-3
Chinese
EUC-CN, HZ, GBK, CP936, GB18030, EUC-TW, BIG5, CP950, BIG5-HKSCS,
BIG5-HKSCS:2004, BIG5-HKSCS:2001, BIG5-HKSCS:1999, ISO-2022-CN,
ISO-2022-CN-EXT, BIG5-2003 (experimental)
Korean
EUC-KR, CP949, ISO-2022-KR, JOHAB
Turkmen
TDS565
Armenian
ARMSCII-8
Georgian
Georgian-Academy, Georgian-PS
Tajik
KOI8-T
Kazakh
PT154, RK1048
Thai
ISO-8859-11, TIS-620, CP874, MacThai
Laotian
MuleLao-1, CP1133
Vietnamese
VISCII, TCVN, CP1258
Platform specifics
HP-ROMAN8, NEXTSTEP, ATARIST, RISCOS-LATIN1
Full Unicode
UTF-8
UCS-2, UCS-2BE, UCS-2LE
UCS-4, UCS-4BE, UCS-4LE
UTF-16, UTF-16BE, UTF-16LE
UTF-32, UTF-32BE, UTF-32LE
UTF-7
C99, JAVA
Full Unicode, in terms of `uint16_t` or `uint32_t`
(with machine dependent endianness and alignment)
UCS-2-INTERNAL, UCS-4-INTERNAL
Locale dependent, in terms of `char` or `wchar_t`
(with machine dependent endianness and alignment, and with OS and
locale dependent semantics)
char, wchar_t
The empty encoding name "" is equivalent to "char": it denotes the
locale dependent character encoding.
If you don't need the full gamut of encodings, consider using [iconv-lite][].
It supports most common encodings and doesn't require a compiler to install.
## Installing with [npm](http://npmjs.org/)
$ npm install iconv
Note that you do not need to have a copy of libiconv installed to use this
module.
## Compiling from source
$ git clone git://github.com/bnoordhuis/node-iconv.git
$ cd node-iconv
$ npm install
If you have a specific node.js source checkout that you want to build against,
replace the last command with:
$ npm install --nodedir=/path/to/node
## Usage
Encode from one character encoding to another:
// convert from UTF-8 to ISO-8859-1
var Buffer = require('buffer').Buffer;
var Iconv = require('iconv').Iconv;
var assert = require('assert');
var iconv = new Iconv('UTF-8', 'ISO-8859-1');
var buffer = iconv.convert('Hello, world!');
var buffer2 = iconv.convert(Buffer.from('Hello, world!'));
assert.equals(buffer.inspect(), buffer2.inspect());
// do something useful with the buffers
A simple ISO-8859-1 to UTF-8 conversion TCP service:
var net = require('net');
var Iconv = require('iconv').Iconv;
var server = net.createServer(function(conn) {
var iconv = new Iconv('latin1', 'utf-8');
conn.pipe(iconv).pipe(conn);
});
server.listen(8000);
console.log('Listening on tcp://0.0.0.0:8000/');
Look at test/test-basic.js and test/test-stream.js for more examples
and node-iconv's behaviour under error conditions.
## Notes
Things to keep in mind when you work with node-iconv.
### Chunked data
Say you are reading data in chunks from a HTTP stream. The logical input is a
single document (the full POST request data) but the physical input will be
spread over several buffers (the request chunks).
You must accumulate the small buffers into a single large buffer before
performing the conversion. If you don't, you will get unexpected results with
multi-byte and stateful character sets like UTF-8 and ISO-2022-JP.
The above only applies when you are calling `Iconv#convert()` yourself.
If you use the streaming interface, node-iconv takes care of stitching
partial character sequences together again.
### Dealing with untranslatable characters
Characters are not always translatable to another encoding. The UTF-8 string
"ça va が", for example, cannot be represented in plain 7-bits ASCII without
some loss of fidelity.
By default, node-iconv throws EILSEQ when untranslatabe characters are
encountered but this can be customized. Quoting the `iconv_open(3)` man page:
//TRANSLIT
When the string "//TRANSLIT" is appended to tocode, transliteration is
activated. This means that when a character cannot be represented in the
target character set, it can be approximated through one or several
similarly looking characters.
//IGNORE
When the string "//IGNORE" is appended to tocode, characters that cannot be
represented in the target character set will be silently discarded.
Example usage:
var iconv = new Iconv('UTF-8', 'ASCII');
iconv.convert('ça va'); // throws EILSEQ
var iconv = new Iconv('UTF-8', 'ASCII//IGNORE');
iconv.convert('ça va'); // returns "a va"
var iconv = new Iconv('UTF-8', 'ASCII//TRANSLIT');
iconv.convert('ça va'); // "ca va"
var iconv = new Iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE');
iconv.convert('ça va が'); // "ca va "
### EINVAL
EINVAL is raised when the input ends in a partial character sequence. This is a
feature, not a bug.
[iconv-lite]: https://www.npmjs.org/package/iconv-lite
/*
* Copyright (c) 2013, Ben Noordhuis <info@bnoordhuis.nl>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include "iconv.h"
#include "node_api.h"
#include <assert.h>
#include <errno.h>
#include <stdint.h>
#include <stdlib.h>
#ifndef E2BIG
#define E2BIG 0
#endif
#ifndef EILSEQ
#define EILSEQ 0
#endif
#ifndef EINVAL
#define EINVAL 0
#endif
#ifndef ICONV_CONST
#define ICONV_CONST
#endif
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(*x))
int
getpointer(napi_env env, napi_value argv[], uint32_t idx, char **out)
{
uint32_t pos;
void *p;
if (napi_get_typedarray_info(env, argv[idx + 0], 0, 0, &p, 0, 0))
return 1;
if (napi_get_value_uint32(env, argv[idx + 1], &pos))
return 1;
*out = (char *) p + pos;
return 0;
}
int
offsetat(napi_env env, napi_value array, uint32_t idx, size_t *out)
{
napi_value jsval;
uint32_t nval;
if (napi_get_element(env, array, idx, &jsval))
return 1;
if (napi_get_value_uint32(env, jsval, &nval))
return 1;
*out = nval;
return 0;
}
void
finalize(napi_env env, void *data, void *hint)
{
iconv_t conv;
conv = data;
if (conv != (iconv_t) -1)
iconv_close(conv);
}
napi_value
make(napi_env env, napi_callback_info info)
{
char from[64];
char to[64];
iconv_t conv;
napi_value argv[2];
napi_value rval;
size_t argc;
if (napi_get_null(env, &rval))
abort();
argc = ARRAY_SIZE(argv);
if (napi_get_cb_info(env, info, &argc, argv, 0, 0))
return rval;
if (napi_get_value_string_utf8(env, argv[0], from, sizeof(from), 0))
return rval;
if (napi_get_value_string_utf8(env, argv[1], to, sizeof(to), 0))
return rval;
conv = iconv_open(to, from);
if (conv != (iconv_t) -1)
if (napi_create_external(env, conv, finalize, 0, &rval))
iconv_close(conv);
return rval;
}
napi_value
convert(napi_env env, napi_callback_info info)
{
bool is_flush;
char *inbuf;
char *outbuf;
iconv_t conv;
int err;
napi_value argv[7];
napi_value inout;
napi_value rval;
napi_value val;
size_t argc;
size_t inlen;
size_t n;
size_t outlen;
if (napi_get_null(env, &rval))
abort();
argc = ARRAY_SIZE(argv);
if (napi_get_cb_info(env, info, &argc, argv, 0, 0))
return rval;
if (napi_get_value_bool(env, argv[0], &is_flush))
return rval;
if (napi_get_value_external(env, argv[1], &conv))
return rval;
inbuf = 0;
if (!is_flush)
if (getpointer(env, argv, 2, &inbuf))
return rval;
if (getpointer(env, argv, 4, &outbuf))
return rval;
inout = argv[6];
if (offsetat(env, inout, 0, &inlen))
return rval;
if (offsetat(env, inout, 1, &outlen))
return rval;
n = iconv(conv, (ICONV_CONST char **) &inbuf, &inlen, &outbuf, &outlen);
err = 0;
if (n == (size_t) -1)
err = errno;
if (napi_create_uint32(env, inlen, &val))
return rval;
if (napi_set_element(env, inout, 0, val))
return rval;
if (napi_create_uint32(env, outlen, &val))
return rval;
if (napi_set_element(env, inout, 1, val))
return rval;
if (napi_create_uint32(env, err, &rval))
return rval;
return rval;
}
#define EXPORT_METHOD(desc, name) \
do \
{ \
*desc = (napi_property_descriptor) \
{ \
.utf8name = #name, \
.method = name, \
}; \
} \
while (0)
#define EXPORT_VALUE(desc, name) \
do \
{ \
napi_value result; \
\
if (napi_create_int32(env, name, &result)) \
return exports; \
\
*desc = (napi_property_descriptor) \
{ \
.utf8name = #name, \
.value = result, \
}; \
} \
while (0)
napi_value
init(napi_env env, napi_value exports)
{
napi_property_descriptor props[5];
EXPORT_METHOD(&props[0], convert);
EXPORT_METHOD(&props[1], make);
EXPORT_VALUE(&props[2], E2BIG);
EXPORT_VALUE(&props[3], EILSEQ);
EXPORT_VALUE(&props[4], EINVAL);
napi_define_properties(env, exports, ARRAY_SIZE(props), props);
return exports;
}
NAPI_MODULE(iconv, init);
{
'variables': {
'node_iconv_use_system_libiconv%': 0,
},
'targets': [
{
'target_name': 'iconv',
'sources': ['binding.c'],
'ccflags': ['-Wall', '-Wextra'],
# Have to repeat flags on mac because of gyp's xcode emulation "feature".
'xcode_settings': {
'WARNING_CFLAGS': ['-Wall', '-Wextra'],
},
'conditions': [
['node_iconv_use_system_libiconv==0', {
'defines': ['ICONV_CONST=const', 'ENABLE_EXTRA=1'],
'include_dirs': ['support'],
'sources': [
'deps/libiconv/lib/iconv.c',
'support/localcharset.c',
],
'cflags!': ['-W', '-Wall', '-Wextra'],
'msvs_settings': {
'VCCLCompilerTool': {
'DisableSpecificWarnings': [
'4018', # Signed/unsigned comparison.
'4090', # Const/non-const mismatch.
'4244', # Narrowing cast.
'4267', # Narrowing cast.
],
},
},
'xcode_settings': {
'WARNING_CFLAGS!': ['-W', '-Wall', '-Wextra'],
'WARNING_CFLAGS': [
'-Wno-parentheses-equality',
'-Wno-static-in-inline',
'-Wno-tautological-compare',
],
},
}],
],
},
],
}
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ProjectOutputs>C:\Users\worro\OneDrive\Desktop\openSourceSoftware\webcrawling-practice\node_modules\iconv\build\Release\iconv.node</ProjectOutputs>
<ContentFiles></ContentFiles>
<SatelliteDlls></SatelliteDlls>
<NonRecipeFileRefs></NonRecipeFileRefs>
</Project>
\ No newline at end of file
PlatformToolSet=v142:VCToolArchitecture=Native64Bit:VCToolsVersion=14.27.29110:TargetPlatformVersion=10.0.18362.0:
Release|x64|C:\Users\worro\OneDrive\Desktop\openSourceSoftware\webcrawling-practice\node_modules\iconv\build\|
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2015
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iconv", "iconv.vcxproj", "{1E29E2A9-0E02-05FC-F24C-B1B0F02605CA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Release|x64 = Release|x64
Debug|x64 = Debug|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1E29E2A9-0E02-05FC-F24C-B1B0F02605CA}.Release|x64.ActiveCfg = Release|x64
{1E29E2A9-0E02-05FC-F24C-B1B0F02605CA}.Release|x64.Build.0 = Release|x64
{1E29E2A9-0E02-05FC-F24C-B1B0F02605CA}.Debug|x64.ActiveCfg = Debug|x64
{1E29E2A9-0E02-05FC-F24C-B1B0F02605CA}.Debug|x64.Build.0 = Debug|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
# Do not edit. File was generated by node-gyp's "configure" step
{
"target_defaults": {
"cflags": [],
"default_configuration": "Release",
"defines": [],
"include_dirs": [],
"libraries": [],
"msbuild_toolset": "v142",
"msvs_windows_target_platform_version": "10.0.18362.0"
},
"variables": {
"asan": 0,
"build_v8_with_gn": "false",
"coverage": "false",
"dcheck_always_on": 0,
"debug_nghttp2": "false",
"debug_node": "false",
"enable_lto": "false",
"enable_pgo_generate": "false",
"enable_pgo_use": "false",
"force_dynamic_crt": 0,
"host_arch": "x64",
"icu_data_in": "..\\..\\deps/icu-small\\source/data/in\\icudt67l.dat",
"icu_default_data": "",
"icu_endianness": "l",
"icu_gyp_path": "tools/icu/icu-generic.gyp",
"icu_locales": "en,root",
"icu_path": "deps/icu-small",
"icu_small": "true",
"icu_ver_major": "67",
"is_debug": 0,
"napi_build_version": "7",
"nasm_version": "2.14",
"node_byteorder": "little",
"node_debug_lib": "false",
"node_enable_d8": "false",
"node_install_npm": "true",
"node_module_version": 72,
"node_no_browser_globals": "false",
"node_prefix": "/usr/local",
"node_release_urlbase": "https://nodejs.org/download/release/",
"node_shared": "false",
"node_shared_brotli": "false",
"node_shared_cares": "false",
"node_shared_http_parser": "false",
"node_shared_libuv": "false",
"node_shared_nghttp2": "false",
"node_shared_openssl": "false",
"node_shared_zlib": "false",
"node_tag": "",
"node_target_type": "executable",
"node_use_bundled_v8": "true",
"node_use_dtrace": "false",
"node_use_etw": "true",
"node_use_node_code_cache": "true",
"node_use_node_snapshot": "true",
"node_use_openssl": "true",
"node_use_v8_platform": "true",
"node_with_ltcg": "true",
"node_without_node_options": "false",
"openssl_fips": "",
"openssl_is_fips": "false",
"ossfuzz": "false",
"shlib_suffix": "so.72",
"target_arch": "x64",
"v8_enable_gdbjit": 0,
"v8_enable_i18n_support": 1,
"v8_enable_inspector": 1,
"v8_enable_lite_mode": 0,
"v8_enable_object_print": 1,
"v8_no_strict_aliasing": 1,
"v8_optimized_debug": 1,
"v8_promise_internal_field_count": 1,
"v8_random_seed": 0,
"v8_trace_maps": 0,
"v8_use_siphash": 1,
"v8_use_snapshot": 1,
"want_separate_host_toolset": 0,
"nodedir": "C:\\Users\\worro\\AppData\\Local\\node-gyp\\Cache\\12.19.0",
"standalone_static_library": 1,
"msbuild_path": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe",
"access": "",
"allow_same_version": "",
"also": "",
"always_auth": "",
"audit": "true",
"audit_level": "low",
"auth_type": "legacy",
"before": "",
"bin_links": "true",
"browser": "",
"ca": "",
"cache": "C:\\Users\\worro\\AppData\\Roaming\\npm-cache",
"cache_lock_retries": "10",
"cache_lock_stale": "60000",
"cache_lock_wait": "10000",
"cache_max": "Infinity",
"cache_min": "10",
"cert": "",
"cidr": "",
"color": "true",
"commit_hooks": "true",
"depth": "Infinity",
"description": "true",
"dev": "",
"dry_run": "",
"editor": "notepad.exe",
"engine_strict": "",
"fetch_retries": "2",
"fetch_retry_factor": "10",
"fetch_retry_maxtimeout": "60000",
"fetch_retry_mintimeout": "10000",
"force": "",
"format_package_lock": "true",
"fund": "true",
"git": "git",
"git_tag_version": "true",
"global": "",
"globalconfig": "C:\\Users\\worro\\AppData\\Roaming\\npm\\etc\\npmrc",
"globalignorefile": "C:\\Users\\worro\\AppData\\Roaming\\npm\\etc\\npmignore",
"global_style": "",
"group": "",
"ham_it_up": "",
"heading": "npm",
"https_proxy": "",
"if_present": "",
"ignore_prepublish": "",
"ignore_scripts": "",
"init_author_email": "",
"init_author_name": "",
"init_author_url": "",
"init_license": "ISC",
"init_module": "C:\\Users\\worro\\.npm-init.js",
"init_version": "1.0.0",
"json": "",
"key": "",
"legacy_bundling": "",
"link": "",
"local_address": "",
"logs_max": "10",
"long": "",
"maxsockets": "50",
"message": "%s",
"metrics_registry": "https://registry.npmjs.org/",
"node_gyp": "D:\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js",
"node_options": "",
"node_version": "12.19.0",
"offline": "",
"onload_script": "",
"only": "",
"optional": "true",
"otp": "",
"package_lock": "true",
"package_lock_only": "",
"parseable": "",
"prefer_offline": "",
"prefer_online": "",
"prefix": "C:\\Users\\worro\\AppData\\Roaming\\npm",
"preid": "",
"production": "",
"progress": "true",
"read_only": "",
"rebuild_bundle": "true",
"registry": "https://registry.npmjs.org/",
"rollback": "true",
"save": "true",
"save_bundle": "",
"save_dev": "",
"save_exact": "",
"save_optional": "",
"save_prefix": "^",
"save_prod": "",
"scope": "",
"scripts_prepend_node_path": "warn-only",
"script_shell": "",
"searchexclude": "",
"searchlimit": "20",
"searchopts": "",
"searchstaleness": "900",
"send_metrics": "",
"shell": "C:\\WINDOWS\\system32\\cmd.exe",
"shrinkwrap": "true",
"sign_git_commit": "",
"sign_git_tag": "",
"sso_poll_frequency": "500",
"sso_type": "oauth",
"strict_ssl": "true",
"tag": "latest",
"tag_version_prefix": "v",
"timing": "",
"tmp": "C:\\Users\\worro\\AppData\\Local\\Temp",
"umask": "0000",
"unicode": "",
"unsafe_perm": "true",
"update_notifier": "true",
"usage": "",
"user": "",
"userconfig": "C:\\Users\\worro\\.npmrc",
"user_agent": "npm/6.14.8 node/v12.19.0 win32 x64",
"version": "",
"versions": "",
"viewer": "browser"
}
}
This diff is collapsed. Click to expand it.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="..">
<UniqueIdentifier>{739DB09A-CC57-A953-A6CF-F64FA08E4FA7}</UniqueIdentifier>
</Filter>
<Filter Include="..">
<UniqueIdentifier>{739DB09A-CC57-A953-A6CF-F64FA08E4FA7}</UniqueIdentifier>
</Filter>
<Filter Include="..\deps">
<UniqueIdentifier>{D8C1C9B5-38B1-FC5D-54EB-0CB99232FA56}</UniqueIdentifier>
</Filter>
<Filter Include="..\deps\libiconv">
<UniqueIdentifier>{052AE603-D8AE-15A9-53FB-8AF7D727C3D5}</UniqueIdentifier>
</Filter>
<Filter Include="..\deps\libiconv\lib">
<UniqueIdentifier>{2739B19F-16DF-601C-060A-FF86F6A40045}</UniqueIdentifier>
</Filter>
<Filter Include="..">
<UniqueIdentifier>{739DB09A-CC57-A953-A6CF-F64FA08E4FA7}</UniqueIdentifier>
</Filter>
<Filter Include="..\support">
<UniqueIdentifier>{60E2CDAB-BE66-7795-2926-DDFA2378C4BF}</UniqueIdentifier>
</Filter>
<Filter Include="D:">
<UniqueIdentifier>{E5D29F2B-0177-9942-CA95-0FF700094F89}</UniqueIdentifier>
</Filter>
<Filter Include="D:\nodejs">
<UniqueIdentifier>{A3C8E949-BCF6-0C67-6656-340A2A097708}</UniqueIdentifier>
</Filter>
<Filter Include="D:\nodejs\node_modules">
<UniqueIdentifier>{56DF7A98-063D-FB9D-485C-089023B4C16A}</UniqueIdentifier>
</Filter>
<Filter Include="D:\nodejs\node_modules\npm">
<UniqueIdentifier>{741E0E76-39B2-B1AB-9FA1-F1A20B16F295}</UniqueIdentifier>
</Filter>
<Filter Include="D:\nodejs\node_modules\npm\node_modules">
<UniqueIdentifier>{56DF7A98-063D-FB9D-485C-089023B4C16A}</UniqueIdentifier>
</Filter>
<Filter Include="D:\nodejs\node_modules\npm\node_modules\node-gyp">
<UniqueIdentifier>{77348C0E-2034-7791-74D5-63C077DF5A3B}</UniqueIdentifier>
</Filter>
<Filter Include="D:\nodejs\node_modules\npm\node_modules\node-gyp\src">
<UniqueIdentifier>{8CDEE807-BC53-E450-C8B8-4DEBB66742D4}</UniqueIdentifier>
</Filter>
<Filter Include="..">
<UniqueIdentifier>{739DB09A-CC57-A953-A6CF-F64FA08E4FA7}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\binding.c">
<Filter>..</Filter>
</ClCompile>
<ClCompile Include="..\deps\libiconv\lib\iconv.c">
<Filter>..\deps\libiconv\lib</Filter>
</ClCompile>
<ClCompile Include="..\support\localcharset.c">
<Filter>..\support</Filter>
</ClCompile>
<ClCompile Include="D:\nodejs\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.cc">
<Filter>D:\nodejs\node_modules\npm\node_modules\node-gyp\src</Filter>
</ClCompile>
<None Include="..\binding.gyp">
<Filter>..</Filter>
</None>
</ItemGroup>
</Project>
/*
* Copyright (C) 1999-2003, 2008 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef USE_AIX
# if defined _AIX
# include "aliases_aix_sysaix.h"
# else
# include "aliases_aix.h"
# endif
#endif
#ifdef USE_OSF1
# if defined __osf__
# include "aliases_osf1_sysosf1.h"
# else
# include "aliases_osf1.h"
# endif
#endif
#ifdef USE_DOS
# include "aliases_dos.h"
#endif
#ifdef USE_EXTRA
# include "aliases_extra.h"
#endif
S(aix_0, "CP856", ei_cp856 )
S(aix_1, "CP922", ei_cp922 )
S(aix_2, "CP943", ei_cp943 )
S(aix_3, "CP1046", ei_cp1046 )
S(aix_4, "CP1124", ei_cp1124 )
S(aix_5, "CP1129", ei_cp1129 )
S(aix_6, "CP1161", ei_cp1161 )
S(aix_7, "IBM1161", ei_cp1161 )
S(aix_8, "IBM-1161", ei_cp1161 )
S(aix_9, "CSIBM1161", ei_cp1161 )
S(aix_10, "CP1162", ei_cp1162 )
S(aix_11, "IBM1162", ei_cp1162 )
S(aix_12, "IBM-1162", ei_cp1162 )
S(aix_13, "CSIBM1162", ei_cp1162 )
S(aix_14, "CP1163", ei_cp1163 )
S(aix_15, "IBM1163", ei_cp1163 )
S(aix_16, "IBM-1163", ei_cp1163 )
S(aix_17, "CSIBM1163", ei_cp1163 )
S(aix_0, "CP856", ei_cp856 )
S(aix_1, "IBM-856", ei_cp856 )
S(aix_2, "CP922", ei_cp922 )
S(aix_3, "IBM-922", ei_cp922 )
S(aix_4, "CP943", ei_cp943 )
S(aix_5, "IBM-943", ei_cp943 )
S(aix_6, "CP1046", ei_cp1046 )
S(aix_7, "IBM-1046", ei_cp1046 )
S(aix_8, "CP1124", ei_cp1124 )
S(aix_9, "IBM-1124", ei_cp1124 )
S(aix_10, "CP1129", ei_cp1129 )
S(aix_11, "IBM-1129", ei_cp1129 )
S(aix_12, "CP1161", ei_cp1161 )
S(aix_13, "IBM1161", ei_cp1161 )
S(aix_14, "IBM-1161", ei_cp1161 )
S(aix_15, "CSIBM1161", ei_cp1161 )
S(aix_16, "CP1162", ei_cp1162 )
S(aix_17, "IBM1162", ei_cp1162 )
S(aix_18, "IBM-1162", ei_cp1162 )
S(aix_19, "CSIBM1162", ei_cp1162 )
S(aix_20, "CP1163", ei_cp1163 )
S(aix_21, "IBM1163", ei_cp1163 )
S(aix_22, "IBM-1163", ei_cp1163 )
S(aix_23, "CSIBM1163", ei_cp1163 )
S(dos_0, "CP437", ei_cp437 )
S(dos_1, "IBM437", ei_cp437 )
S(dos_2, "437", ei_cp437 )
S(dos_3, "CSPC8CODEPAGE437", ei_cp437 )
S(dos_4, "CP737", ei_cp737 )
S(dos_5, "CP775", ei_cp775 )
S(dos_6, "IBM775", ei_cp775 )
S(dos_7, "CSPC775BALTIC", ei_cp775 )
S(dos_8, "CP852", ei_cp852 )
S(dos_9, "IBM852", ei_cp852 )
S(dos_10, "852", ei_cp852 )
S(dos_11, "CSPCP852", ei_cp852 )
S(dos_12, "CP853", ei_cp853 )
S(dos_13, "CP855", ei_cp855 )
S(dos_14, "IBM855", ei_cp855 )
S(dos_15, "855", ei_cp855 )
S(dos_16, "CSIBM855", ei_cp855 )
S(dos_17, "CP857", ei_cp857 )
S(dos_18, "IBM857", ei_cp857 )
S(dos_19, "857", ei_cp857 )
S(dos_20, "CSIBM857", ei_cp857 )
S(dos_21, "CP858", ei_cp858 )
S(dos_22, "CP860", ei_cp860 )
S(dos_23, "IBM860", ei_cp860 )
S(dos_24, "860", ei_cp860 )
S(dos_25, "CSIBM860", ei_cp860 )
S(dos_26, "CP861", ei_cp861 )
S(dos_27, "IBM861", ei_cp861 )
S(dos_28, "861", ei_cp861 )
S(dos_29, "CP-IS", ei_cp861 )
S(dos_30, "CSIBM861", ei_cp861 )
S(dos_31, "CP863", ei_cp863 )
S(dos_32, "IBM863", ei_cp863 )
S(dos_33, "863", ei_cp863 )
S(dos_34, "CSIBM863", ei_cp863 )
S(dos_35, "CP864", ei_cp864 )
S(dos_36, "IBM864", ei_cp864 )
S(dos_37, "CSIBM864", ei_cp864 )
S(dos_38, "CP865", ei_cp865 )
S(dos_39, "IBM865", ei_cp865 )
S(dos_40, "865", ei_cp865 )
S(dos_41, "CSIBM865", ei_cp865 )
S(dos_42, "CP869", ei_cp869 )
S(dos_43, "IBM869", ei_cp869 )
S(dos_44, "869", ei_cp869 )
S(dos_45, "CP-GR", ei_cp869 )
S(dos_46, "CSIBM869", ei_cp869 )
S(dos_47, "CP1125", ei_cp1125 )
S(extra_0, "EUC-JISX0213", ei_euc_jisx0213 )
S(extra_1, "EUC-JIS-2004", ei_euc_jisx0213 )
S(extra_2, "SHIFT_JISX0213", ei_shift_jisx0213 )
S(extra_3, "SHIFT_JIS-2004", ei_shift_jisx0213 )
S(extra_4, "ISO-2022-JP-3", ei_iso2022_jp3 )
S(extra_5, "ISO-2022-JP-2004", ei_iso2022_jp3 )
S(extra_6, "BIG5-2003", ei_big5_2003 )
S(extra_7, "TDS565", ei_tds565 )
S(extra_8, "ISO-IR-230", ei_tds565 )
S(extra_9, "ATARIST", ei_atarist )
S(extra_10, "ATARI", ei_atarist )
S(extra_11, "RISCOS-LATIN1", ei_riscos1 )
S(osf1_0, "DEC-KANJI", ei_dec_kanji )
S(osf1_1, "DEC-HANYU", ei_dec_hanyu )
S(osf1_0, "DEC-KANJI", ei_dec_kanji )
S(osf1_1, "DECKANJI", ei_dec_kanji )
S(osf1_2, "DEC-HANYU", ei_dec_hanyu )
S(osf1_3, "DECHANYU", ei_dec_hanyu )
/*
* Copyright (C) 1999-2002, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* ARMSCII-8
*/
static const unsigned short armscii_8_2uni[96] = {
/* 0xa0 */
0x00a0, 0xfffd, 0x0587, 0x0589, 0x0029, 0x0028, 0x00bb, 0x00ab,
0x2014, 0x002e, 0x055d, 0x002c, 0x002d, 0x058a, 0x2026, 0x055c,
/* 0xb0 */
0x055b, 0x055e, 0x0531, 0x0561, 0x0532, 0x0562, 0x0533, 0x0563,
0x0534, 0x0564, 0x0535, 0x0565, 0x0536, 0x0566, 0x0537, 0x0567,
/* 0xc0 */
0x0538, 0x0568, 0x0539, 0x0569, 0x053a, 0x056a, 0x053b, 0x056b,
0x053c, 0x056c, 0x053d, 0x056d, 0x053e, 0x056e, 0x053f, 0x056f,
/* 0xd0 */
0x0540, 0x0570, 0x0541, 0x0571, 0x0542, 0x0572, 0x0543, 0x0573,
0x0544, 0x0574, 0x0545, 0x0575, 0x0546, 0x0576, 0x0547, 0x0577,
/* 0xe0 */
0x0548, 0x0578, 0x0549, 0x0579, 0x054a, 0x057a, 0x054b, 0x057b,
0x054c, 0x057c, 0x054d, 0x057d, 0x054e, 0x057e, 0x054f, 0x057f,
/* 0xf0 */
0x0550, 0x0580, 0x0551, 0x0581, 0x0552, 0x0582, 0x0553, 0x0583,
0x0554, 0x0584, 0x0555, 0x0585, 0x0556, 0x0586, 0x055a, 0xfffd,
};
static int
armscii_8_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0xa0) {
*pwc = (ucs4_t) c;
return 1;
}
else {
unsigned short wc = armscii_8_2uni[c-0xa0];
if (wc != 0xfffd) {
*pwc = (ucs4_t) wc;
return 1;
}
}
return RET_ILSEQ;
}
static const unsigned char armscii_8_page00[8] = {
0xa5, 0xa4, 0x2a, 0x2b, 0xab, 0xac, 0xa9, 0x2f, /* 0x28-0x2f */
};
static const unsigned char armscii_8_page00_1[32] = {
0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
0x00, 0x00, 0x00, 0xa7, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */
0x00, 0x00, 0x00, 0xa6, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
};
static const unsigned char armscii_8_page05[96] = {
0x00, 0xb2, 0xb4, 0xb6, 0xb8, 0xba, 0xbc, 0xbe, /* 0x30-0x37 */
0xc0, 0xc2, 0xc4, 0xc6, 0xc8, 0xca, 0xcc, 0xce, /* 0x38-0x3f */
0xd0, 0xd2, 0xd4, 0xd6, 0xd8, 0xda, 0xdc, 0xde, /* 0x40-0x47 */
0xe0, 0xe2, 0xe4, 0xe6, 0xe8, 0xea, 0xec, 0xee, /* 0x48-0x4f */
0xf0, 0xf2, 0xf4, 0xf6, 0xf8, 0xfa, 0xfc, 0x00, /* 0x50-0x57 */
0x00, 0x00, 0xfe, 0xb0, 0xaf, 0xaa, 0xb1, 0x00, /* 0x58-0x5f */
0x00, 0xb3, 0xb5, 0xb7, 0xb9, 0xbb, 0xbd, 0xbf, /* 0x60-0x67 */
0xc1, 0xc3, 0xc5, 0xc7, 0xc9, 0xcb, 0xcd, 0xcf, /* 0x68-0x6f */
0xd1, 0xd3, 0xd5, 0xd7, 0xd9, 0xdb, 0xdd, 0xdf, /* 0x70-0x77 */
0xe1, 0xe3, 0xe5, 0xe7, 0xe9, 0xeb, 0xed, 0xef, /* 0x78-0x7f */
0xf1, 0xf3, 0xf5, 0xf7, 0xf9, 0xfb, 0xfd, 0xa2, /* 0x80-0x87 */
0x00, 0xa3, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
};
static const unsigned char armscii_8_page20[24] = {
0x00, 0x00, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x00, /* 0x10-0x17 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xae, 0x00, /* 0x20-0x27 */
};
static int
armscii_8_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char c = 0;
if (wc < 0x0028) {
*r = wc;
return 1;
}
else if (wc >= 0x0028 && wc < 0x0030)
c = armscii_8_page00[wc-0x0028];
else if (wc >= 0x0030 && wc < 0x00a0)
c = wc;
else if (wc >= 0x00a0 && wc < 0x00c0)
c = armscii_8_page00_1[wc-0x00a0];
else if (wc >= 0x0530 && wc < 0x0590)
c = armscii_8_page05[wc-0x0530];
else if (wc >= 0x2010 && wc < 0x2028)
c = armscii_8_page20[wc-0x2010];
if (c != 0) {
*r = c;
return 1;
}
return RET_ILUNI;
}
/*
* Copyright (C) 1999-2001, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* ASCII
*/
static int
ascii_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0x80) {
*pwc = (ucs4_t) c;
return 1;
}
return RET_ILSEQ;
}
static int
ascii_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
if (wc < 0x0080) {
*r = wc;
return 1;
}
return RET_ILUNI;
}
/*
* Copyright (C) 1999-2005, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Atari ST
*/
static const unsigned short atarist_2uni[128] = {
/* 0x80 */
0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e4, 0x00e0, 0x00e5, 0x00e7,
0x00ea, 0x00eb, 0x00e8, 0x00ef, 0x00ee, 0x00ec, 0x00c4, 0x00c5,
/* 0x90 */
0x00c9, 0x00e6, 0x00c6, 0x00f4, 0x00f6, 0x00f2, 0x00fb, 0x00f9,
0x00ff, 0x00d6, 0x00dc, 0x00a2, 0x00a3, 0x00a5, 0x00df, 0x0192,
/* 0xa0 */
0x00e1, 0x00ed, 0x00f3, 0x00fa, 0x00f1, 0x00d1, 0x00aa, 0x00ba,
0x00bf, 0x2310, 0x00ac, 0x00bd, 0x00bc, 0x00a1, 0x00ab, 0x00bb,
/* 0xb0 */
0x00e3, 0x00f5, 0x00d8, 0x00f8, 0x0153, 0x0152, 0x00c0, 0x00c3,
0x00d5, 0x00a8, 0x00b4, 0x2020, 0x00b6, 0x00a9, 0x00ae, 0x2122,
/* 0xc0 */
0x0133, 0x0132, 0x05d0, 0x05d1, 0x05d2, 0x05d3, 0x05d4, 0x05d5,
0x05d6, 0x05d7, 0x05d8, 0x05d9, 0x05db, 0x05dc, 0x05de, 0x05e0,
/* 0xd0 */
0x05e1, 0x05e2, 0x05e4, 0x05e6, 0x05e7, 0x05e8, 0x05e9, 0x05ea,
0x05df, 0x05da, 0x05dd, 0x05e3, 0x05e5, 0x00a7, 0x2227, 0x221e,
/* 0xe0 */
0x03b1, 0x03b2, 0x0393, 0x03c0, 0x03a3, 0x03c3, 0x00b5, 0x03c4,
0x03a6, 0x0398, 0x03a9, 0x03b4, 0x222e, 0x03c6, 0x2208, 0x2229,
/* 0xf0 */
0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248,
0x00b0, 0x2219, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x00b3, 0x00af,
};
static int
atarist_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0x80)
*pwc = (ucs4_t) c;
else
*pwc = (ucs4_t) atarist_2uni[c-0x80];
return 1;
}
static const unsigned char atarist_page00[96] = {
0x00, 0xad, 0x9b, 0x9c, 0x00, 0x9d, 0x00, 0xdd, /* 0xa0-0xa7 */
0xb9, 0xbd, 0xa6, 0xae, 0xaa, 0x00, 0xbe, 0xff, /* 0xa8-0xaf */
0xf8, 0xf1, 0xfd, 0xfe, 0xba, 0xe6, 0xbc, 0xfa, /* 0xb0-0xb7 */
0x00, 0x00, 0xa7, 0xaf, 0xac, 0xab, 0x00, 0xa8, /* 0xb8-0xbf */
0xb6, 0x00, 0x00, 0xb7, 0x8e, 0x8f, 0x92, 0x80, /* 0xc0-0xc7 */
0x00, 0x90, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
0x00, 0xa5, 0x00, 0x00, 0x00, 0xb8, 0x99, 0x00, /* 0xd0-0xd7 */
0xb2, 0x00, 0x00, 0x00, 0x9a, 0x00, 0x00, 0x9e, /* 0xd8-0xdf */
0x85, 0xa0, 0x83, 0xb0, 0x84, 0x86, 0x91, 0x87, /* 0xe0-0xe7 */
0x8a, 0x82, 0x88, 0x89, 0x8d, 0xa1, 0x8c, 0x8b, /* 0xe8-0xef */
0x00, 0xa4, 0x95, 0xa2, 0x93, 0xb1, 0x94, 0xf6, /* 0xf0-0xf7 */
0xb3, 0x97, 0xa3, 0x96, 0x81, 0x00, 0x00, 0x98, /* 0xf8-0xff */
};
static const unsigned char atarist_page01[104] = {
0x00, 0x00, 0xc1, 0xc0, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
0x00, 0x00, 0xb5, 0xb4, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
0x00, 0x00, 0x9f, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
};
static const unsigned char atarist_page03[56] = {
0x00, 0x00, 0x00, 0xe2, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
0xe9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */
0x00, 0x00, 0x00, 0xe4, 0x00, 0x00, 0xe8, 0x00, /* 0xa0-0xa7 */
0x00, 0xea, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
0x00, 0xe0, 0xe1, 0x00, 0xeb, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
0xe3, 0x00, 0x00, 0xe5, 0xe7, 0x00, 0xed, 0x00, /* 0xc0-0xc7 */
};
static const unsigned char atarist_page05[32] = {
0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, /* 0xd0-0xd7 */
0xca, 0xcb, 0xd9, 0xcc, 0xcd, 0xda, 0xce, 0xd8, /* 0xd8-0xdf */
0xcf, 0xd0, 0xd1, 0xdb, 0xd2, 0xdc, 0xd3, 0xd4, /* 0xe0-0xe7 */
0xd5, 0xd6, 0xd7, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe8-0xef */
};
static const unsigned char atarist_page22[96] = {
0xee, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
0x00, 0xf9, 0xfb, 0x00, 0x00, 0x00, 0xdf, 0x00, /* 0x18-0x1f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xde, /* 0x20-0x27 */
0x00, 0xef, 0x00, 0x00, 0x00, 0x00, 0xec, 0x00, /* 0x28-0x2f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
0x00, 0xf0, 0x00, 0x00, 0xf3, 0xf2, 0x00, 0x00, /* 0x60-0x67 */
};
static const unsigned char atarist_page23[24] = {
0xa9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
0xf4, 0xf5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
};
static int
atarist_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char c = 0;
if (wc < 0x0080) {
*r = wc;
return 1;
}
else if (wc >= 0x00a0 && wc < 0x0100)
c = atarist_page00[wc-0x00a0];
else if (wc >= 0x0130 && wc < 0x0198)
c = atarist_page01[wc-0x0130];
else if (wc >= 0x0390 && wc < 0x03c8)
c = atarist_page03[wc-0x0390];
else if (wc >= 0x05d0 && wc < 0x05f0)
c = atarist_page05[wc-0x05d0];
else if (wc == 0x2020)
c = 0xbb;
else if (wc == 0x207f)
c = 0xfc;
else if (wc == 0x2122)
c = 0xbf;
else if (wc >= 0x2208 && wc < 0x2268)
c = atarist_page22[wc-0x2208];
else if (wc >= 0x2310 && wc < 0x2328)
c = atarist_page23[wc-0x2310];
if (c != 0) {
*r = c;
return 1;
}
return RET_ILUNI;
}
This diff could not be displayed because it is too large.
/*
* Copyright (C) 1999-2002, 2006, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* BIG5-HKSCS:1999
*/
/*
* BIG5-HKSCS:1999 can be downloaded from
* http://www.info.gov.hk/digital21/eng/hkscs/download.html
* http://www.info.gov.hk/digital21/eng/hkscs/index.html
*
* It extends BIG5 (without the rows 0xC6..0xC7) through the ranges
*
* 0x{88..8D}{40..7E,A1..FE} 641 characters
* 0x{8E..A0}{40..7E,A1..FE} 2898 characters
* 0x{C6..C8}{40..7E,A1..FE} 359 characters
* 0xF9{D6..FE} 41 characters
* 0x{FA..FE}{40..7E,A1..FE} 763 characters
*
* Note that some HKSCS characters are not contained in Unicode 3.2
* and are therefore best represented as sequences of Unicode characters:
* 0x8862 U+00CA U+0304 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND MACRON
* 0x8864 U+00CA U+030C LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND CARON
* 0x88A3 U+00EA U+0304 LATIN SMALL LETTER E WITH CIRCUMFLEX AND MACRON
* 0x88A5 U+00EA U+030C LATIN SMALL LETTER E WITH CIRCUMFLEX AND CARON
*/
#include "hkscs1999.h"
#include "flushwc.h"
static int
big5hkscs1999_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
ucs4_t last_wc = conv->istate;
if (last_wc) {
/* Output the buffered character. */
conv->istate = 0;
*pwc = last_wc;
return 0; /* Don't advance the input pointer. */
} else {
unsigned char c = *s;
/* Code set 0 (ASCII) */
if (c < 0x80)
return ascii_mbtowc(conv,pwc,s,n);
/* Code set 1 (BIG5 extended) */
if (c >= 0xa1 && c < 0xff) {
if (n < 2)
return RET_TOOFEW(0);
{
unsigned char c2 = s[1];
if ((c2 >= 0x40 && c2 < 0x7f) || (c2 >= 0xa1 && c2 < 0xff)) {
if (!((c == 0xc6 && c2 >= 0xa1) || c == 0xc7)) {
int ret = big5_mbtowc(conv,pwc,s,2);
if (ret != RET_ILSEQ)
return ret;
}
}
}
}
{
int ret = hkscs1999_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
if (c == 0x88) {
if (n < 2)
return RET_TOOFEW(0);
{
unsigned char c2 = s[1];
if (c2 == 0x62 || c2 == 0x64 || c2 == 0xa3 || c2 == 0xa5) {
/* It's a composed character. */
ucs4_t wc1 = ((c2 >> 3) << 2) + 0x009a; /* = 0x00ca or 0x00ea */
ucs4_t wc2 = ((c2 & 6) << 2) + 0x02fc; /* = 0x0304 or 0x030c */
/* We cannot output two Unicode characters at once. So,
output the first character and buffer the second one. */
*pwc = wc1;
conv->istate = wc2;
return 2;
}
}
}
return RET_ILSEQ;
}
}
#define big5hkscs1999_flushwc normal_flushwc
static int
big5hkscs1999_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
int count = 0;
unsigned char last = conv->ostate;
if (last) {
/* last is = 0x66 or = 0xa7. */
if (wc == 0x0304 || wc == 0x030c) {
/* Output the combined character. */
if (n >= 2) {
r[0] = 0x88;
r[1] = last + ((wc & 24) >> 2) - 4; /* = 0x62 or 0x64 or 0xa3 or 0xa5 */
conv->ostate = 0;
return 2;
} else
return RET_TOOSMALL;
}
/* Output the buffered character. */
if (n < 2)
return RET_TOOSMALL;
r[0] = 0x88;
r[1] = last;
r += 2;
count = 2;
}
/* Code set 0 (ASCII) */
if (wc < 0x0080) {
/* Plain ASCII character. */
if (n > count) {
r[0] = (unsigned char) wc;
conv->ostate = 0;
return count+1;
} else
return RET_TOOSMALL;
} else {
unsigned char buf[2];
int ret;
/* Code set 1 (BIG5 extended) */
ret = big5_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (!((buf[0] == 0xc6 && buf[1] >= 0xa1) || buf[0] == 0xc7)) {
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
}
ret = hkscs1999_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if ((wc & ~0x0020) == 0x00ca) {
/* A possible first character of a multi-character sequence. We have to
buffer it. */
if (!(buf[0] == 0x88 && (buf[1] == 0x66 || buf[1] == 0xa7))) abort();
conv->ostate = buf[1]; /* = 0x66 or = 0xa7 */
return count+0;
}
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
return RET_ILUNI;
}
}
static int
big5hkscs1999_reset (conv_t conv, unsigned char *r, size_t n)
{
unsigned char last = conv->ostate;
if (last) {
if (n < 2)
return RET_TOOSMALL;
r[0] = 0x88;
r[1] = last;
/* conv->ostate = 0; will be done by the caller */
return 2;
} else
return 0;
}
/*
* Copyright (C) 1999-2002, 2006, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* BIG5-HKSCS:2001
*/
/*
* BIG5-HKSCS:2001 can be downloaded from
* http://www.info.gov.hk/digital21/eng/hkscs/download.html
* http://www.info.gov.hk/digital21/eng/hkscs/index.html
*
* It extends BIG5-HKSCS:1999 through 116 characters.
*
* It extends BIG5 (without the rows 0xC6..0xC7) through the ranges
*
* 0x{88..8D}{40..7E,A1..FE} 757 characters
* 0x{8E..A0}{40..7E,A1..FE} 2898 characters
* 0x{C6..C8}{40..7E,A1..FE} 359 characters
* 0xF9{D6..FE} 41 characters
* 0x{FA..FE}{40..7E,A1..FE} 763 characters
*
* Note that some HKSCS characters are not contained in Unicode 3.2
* and are therefore best represented as sequences of Unicode characters:
* 0x8862 U+00CA U+0304 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND MACRON
* 0x8864 U+00CA U+030C LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND CARON
* 0x88A3 U+00EA U+0304 LATIN SMALL LETTER E WITH CIRCUMFLEX AND MACRON
* 0x88A5 U+00EA U+030C LATIN SMALL LETTER E WITH CIRCUMFLEX AND CARON
*/
#include "hkscs2001.h"
#include "flushwc.h"
static int
big5hkscs2001_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
ucs4_t last_wc = conv->istate;
if (last_wc) {
/* Output the buffered character. */
conv->istate = 0;
*pwc = last_wc;
return 0; /* Don't advance the input pointer. */
} else {
unsigned char c = *s;
/* Code set 0 (ASCII) */
if (c < 0x80)
return ascii_mbtowc(conv,pwc,s,n);
/* Code set 1 (BIG5 extended) */
if (c >= 0xa1 && c < 0xff) {
if (n < 2)
return RET_TOOFEW(0);
{
unsigned char c2 = s[1];
if ((c2 >= 0x40 && c2 < 0x7f) || (c2 >= 0xa1 && c2 < 0xff)) {
if (!((c == 0xc6 && c2 >= 0xa1) || c == 0xc7)) {
int ret = big5_mbtowc(conv,pwc,s,2);
if (ret != RET_ILSEQ)
return ret;
}
}
}
}
{
int ret = hkscs1999_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
{
int ret = hkscs2001_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
if (c == 0x88) {
if (n < 2)
return RET_TOOFEW(0);
{
unsigned char c2 = s[1];
if (c2 == 0x62 || c2 == 0x64 || c2 == 0xa3 || c2 == 0xa5) {
/* It's a composed character. */
ucs4_t wc1 = ((c2 >> 3) << 2) + 0x009a; /* = 0x00ca or 0x00ea */
ucs4_t wc2 = ((c2 & 6) << 2) + 0x02fc; /* = 0x0304 or 0x030c */
/* We cannot output two Unicode characters at once. So,
output the first character and buffer the second one. */
*pwc = wc1;
conv->istate = wc2;
return 2;
}
}
}
return RET_ILSEQ;
}
}
#define big5hkscs2001_flushwc normal_flushwc
static int
big5hkscs2001_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
int count = 0;
unsigned char last = conv->ostate;
if (last) {
/* last is = 0x66 or = 0xa7. */
if (wc == 0x0304 || wc == 0x030c) {
/* Output the combined character. */
if (n >= 2) {
r[0] = 0x88;
r[1] = last + ((wc & 24) >> 2) - 4; /* = 0x62 or 0x64 or 0xa3 or 0xa5 */
conv->ostate = 0;
return 2;
} else
return RET_TOOSMALL;
}
/* Output the buffered character. */
if (n < 2)
return RET_TOOSMALL;
r[0] = 0x88;
r[1] = last;
r += 2;
count = 2;
}
/* Code set 0 (ASCII) */
if (wc < 0x0080) {
/* Plain ASCII character. */
if (n > count) {
r[0] = (unsigned char) wc;
conv->ostate = 0;
return count+1;
} else
return RET_TOOSMALL;
} else {
unsigned char buf[2];
int ret;
/* Code set 1 (BIG5 extended) */
ret = big5_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (!((buf[0] == 0xc6 && buf[1] >= 0xa1) || buf[0] == 0xc7)) {
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
}
ret = hkscs1999_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if ((wc & ~0x0020) == 0x00ca) {
/* A possible first character of a multi-character sequence. We have to
buffer it. */
if (!(buf[0] == 0x88 && (buf[1] == 0x66 || buf[1] == 0xa7))) abort();
conv->ostate = buf[1]; /* = 0x66 or = 0xa7 */
return count+0;
}
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
ret = hkscs2001_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
return RET_ILUNI;
}
}
static int
big5hkscs2001_reset (conv_t conv, unsigned char *r, size_t n)
{
unsigned char last = conv->ostate;
if (last) {
if (n < 2)
return RET_TOOSMALL;
r[0] = 0x88;
r[1] = last;
/* conv->ostate = 0; will be done by the caller */
return 2;
} else
return 0;
}
/*
* Copyright (C) 1999-2002, 2006, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* BIG5-HKSCS:2004
*/
/*
* BIG5-HKSCS:2004 can be downloaded from
* http://www.info.gov.hk/digital21/eng/hkscs/download.html
* http://www.info.gov.hk/digital21/eng/hkscs/index.html
*
* It extends BIG5-HKSCS:2001 through 123 characters.
*
* It extends BIG5 (without the rows 0xC6..0xC7) through the ranges
*
* 0x{87..8D}{40..7E,A1..FE} 880 characters
* 0x{8E..A0}{40..7E,A1..FE} 2898 characters
* 0x{C6..C8}{40..7E,A1..FE} 359 characters
* 0xF9{D6..FE} 41 characters
* 0x{FA..FE}{40..7E,A1..FE} 763 characters
*
* Note that some HKSCS characters are not contained in Unicode 3.2
* and are therefore best represented as sequences of Unicode characters:
* 0x8862 U+00CA U+0304 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND MACRON
* 0x8864 U+00CA U+030C LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND CARON
* 0x88A3 U+00EA U+0304 LATIN SMALL LETTER E WITH CIRCUMFLEX AND MACRON
* 0x88A5 U+00EA U+030C LATIN SMALL LETTER E WITH CIRCUMFLEX AND CARON
*/
#include "hkscs2004.h"
#include "flushwc.h"
static int
big5hkscs2004_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
ucs4_t last_wc = conv->istate;
if (last_wc) {
/* Output the buffered character. */
conv->istate = 0;
*pwc = last_wc;
return 0; /* Don't advance the input pointer. */
} else {
unsigned char c = *s;
/* Code set 0 (ASCII) */
if (c < 0x80)
return ascii_mbtowc(conv,pwc,s,n);
/* Code set 1 (BIG5 extended) */
if (c >= 0xa1 && c < 0xff) {
if (n < 2)
return RET_TOOFEW(0);
{
unsigned char c2 = s[1];
if ((c2 >= 0x40 && c2 < 0x7f) || (c2 >= 0xa1 && c2 < 0xff)) {
if (!((c == 0xc6 && c2 >= 0xa1) || c == 0xc7)) {
int ret = big5_mbtowc(conv,pwc,s,2);
if (ret != RET_ILSEQ)
return ret;
}
}
}
}
{
int ret = hkscs1999_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
{
int ret = hkscs2001_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
{
int ret = hkscs2004_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
if (c == 0x88) {
if (n < 2)
return RET_TOOFEW(0);
{
unsigned char c2 = s[1];
if (c2 == 0x62 || c2 == 0x64 || c2 == 0xa3 || c2 == 0xa5) {
/* It's a composed character. */
ucs4_t wc1 = ((c2 >> 3) << 2) + 0x009a; /* = 0x00ca or 0x00ea */
ucs4_t wc2 = ((c2 & 6) << 2) + 0x02fc; /* = 0x0304 or 0x030c */
/* We cannot output two Unicode characters at once. So,
output the first character and buffer the second one. */
*pwc = wc1;
conv->istate = wc2;
return 2;
}
}
}
return RET_ILSEQ;
}
}
#define big5hkscs2004_flushwc normal_flushwc
static int
big5hkscs2004_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
int count = 0;
unsigned char last = conv->ostate;
if (last) {
/* last is = 0x66 or = 0xa7. */
if (wc == 0x0304 || wc == 0x030c) {
/* Output the combined character. */
if (n >= 2) {
r[0] = 0x88;
r[1] = last + ((wc & 24) >> 2) - 4; /* = 0x62 or 0x64 or 0xa3 or 0xa5 */
conv->ostate = 0;
return 2;
} else
return RET_TOOSMALL;
}
/* Output the buffered character. */
if (n < 2)
return RET_TOOSMALL;
r[0] = 0x88;
r[1] = last;
r += 2;
count = 2;
}
/* Code set 0 (ASCII) */
if (wc < 0x0080) {
/* Plain ASCII character. */
if (n > count) {
r[0] = (unsigned char) wc;
conv->ostate = 0;
return count+1;
} else
return RET_TOOSMALL;
} else {
unsigned char buf[2];
int ret;
/* Code set 1 (BIG5 extended) */
ret = big5_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (!((buf[0] == 0xc6 && buf[1] >= 0xa1) || buf[0] == 0xc7)) {
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
}
ret = hkscs1999_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if ((wc & ~0x0020) == 0x00ca) {
/* A possible first character of a multi-character sequence. We have to
buffer it. */
if (!(buf[0] == 0x88 && (buf[1] == 0x66 || buf[1] == 0xa7))) abort();
conv->ostate = buf[1]; /* = 0x66 or = 0xa7 */
return count+0;
}
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
ret = hkscs2001_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
ret = hkscs2004_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
return RET_ILUNI;
}
}
static int
big5hkscs2004_reset (conv_t conv, unsigned char *r, size_t n)
{
unsigned char last = conv->ostate;
if (last) {
if (n < 2)
return RET_TOOSMALL;
r[0] = 0x88;
r[1] = last;
/* conv->ostate = 0; will be done by the caller */
return 2;
} else
return 0;
}
/*
* Copyright (C) 1999-2002, 2006, 2010 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* BIG5-HKSCS:2008
*/
/*
* BIG5-HKSCS:2008 can be downloaded from
* http://www.ogcio.gov.hk/ccli/eng/hkscs/download.html
* http://www.ogcio.gov.hk/ccli/eng/hkscs/introduction.html
*
* It extends BIG5-HKSCS:2004 through 68 characters.
*
* It extends BIG5 (without the rows 0xC6..0xC7) through the ranges
*
* 0x{87..8D}{40..7E,A1..FE} 880 characters
* 0x{8E..A0}{40..7E,A1..FE} 2898 characters
* 0x{C6..C8}{40..7E,A1..FE} 359 characters
* 0xF9{D6..FE} 41 characters
* 0x{FA..FE}{40..7E,A1..FE} 763 characters
*
* Note that some HKSCS characters are not contained in Unicode 3.2
* and are therefore best represented as sequences of Unicode characters:
* 0x8862 U+00CA U+0304 LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND MACRON
* 0x8864 U+00CA U+030C LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND CARON
* 0x88A3 U+00EA U+0304 LATIN SMALL LETTER E WITH CIRCUMFLEX AND MACRON
* 0x88A5 U+00EA U+030C LATIN SMALL LETTER E WITH CIRCUMFLEX AND CARON
*/
#include "hkscs2008.h"
#include "flushwc.h"
static int
big5hkscs2008_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
ucs4_t last_wc = conv->istate;
if (last_wc) {
/* Output the buffered character. */
conv->istate = 0;
*pwc = last_wc;
return 0; /* Don't advance the input pointer. */
} else {
unsigned char c = *s;
/* Code set 0 (ASCII) */
if (c < 0x80)
return ascii_mbtowc(conv,pwc,s,n);
/* Code set 1 (BIG5 extended) */
if (c >= 0xa1 && c < 0xff) {
if (n < 2)
return RET_TOOFEW(0);
{
unsigned char c2 = s[1];
if ((c2 >= 0x40 && c2 < 0x7f) || (c2 >= 0xa1 && c2 < 0xff)) {
if (!((c == 0xc6 && c2 >= 0xa1) || c == 0xc7)) {
int ret = big5_mbtowc(conv,pwc,s,2);
if (ret != RET_ILSEQ)
return ret;
}
}
}
}
{
int ret = hkscs1999_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
{
int ret = hkscs2001_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
{
int ret = hkscs2004_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
{
int ret = hkscs2008_mbtowc(conv,pwc,s,n);
if (ret != RET_ILSEQ)
return ret;
}
if (c == 0x88) {
if (n < 2)
return RET_TOOFEW(0);
{
unsigned char c2 = s[1];
if (c2 == 0x62 || c2 == 0x64 || c2 == 0xa3 || c2 == 0xa5) {
/* It's a composed character. */
ucs4_t wc1 = ((c2 >> 3) << 2) + 0x009a; /* = 0x00ca or 0x00ea */
ucs4_t wc2 = ((c2 & 6) << 2) + 0x02fc; /* = 0x0304 or 0x030c */
/* We cannot output two Unicode characters at once. So,
output the first character and buffer the second one. */
*pwc = wc1;
conv->istate = wc2;
return 2;
}
}
}
return RET_ILSEQ;
}
}
#define big5hkscs2008_flushwc normal_flushwc
static int
big5hkscs2008_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
int count = 0;
unsigned char last = conv->ostate;
if (last) {
/* last is = 0x66 or = 0xa7. */
if (wc == 0x0304 || wc == 0x030c) {
/* Output the combined character. */
if (n >= 2) {
r[0] = 0x88;
r[1] = last + ((wc & 24) >> 2) - 4; /* = 0x62 or 0x64 or 0xa3 or 0xa5 */
conv->ostate = 0;
return 2;
} else
return RET_TOOSMALL;
}
/* Output the buffered character. */
if (n < 2)
return RET_TOOSMALL;
r[0] = 0x88;
r[1] = last;
r += 2;
count = 2;
}
/* Code set 0 (ASCII) */
if (wc < 0x0080) {
/* Plain ASCII character. */
if (n > count) {
r[0] = (unsigned char) wc;
conv->ostate = 0;
return count+1;
} else
return RET_TOOSMALL;
} else {
unsigned char buf[2];
int ret;
/* Code set 1 (BIG5 extended) */
ret = big5_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (!((buf[0] == 0xc6 && buf[1] >= 0xa1) || buf[0] == 0xc7)) {
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
}
ret = hkscs1999_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if ((wc & ~0x0020) == 0x00ca) {
/* A possible first character of a multi-character sequence. We have to
buffer it. */
if (!(buf[0] == 0x88 && (buf[1] == 0x66 || buf[1] == 0xa7))) abort();
conv->ostate = buf[1]; /* = 0x66 or = 0xa7 */
return count+0;
}
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
ret = hkscs2001_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
ret = hkscs2004_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
ret = hkscs2008_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (n >= count+2) {
r[0] = buf[0];
r[1] = buf[1];
conv->ostate = 0;
return count+2;
} else
return RET_TOOSMALL;
}
return RET_ILUNI;
}
}
static int
big5hkscs2008_reset (conv_t conv, unsigned char *r, size_t n)
{
unsigned char last = conv->ostate;
if (last) {
if (n < 2)
return RET_TOOSMALL;
r[0] = 0x88;
r[1] = last;
/* conv->ostate = 0; will be done by the caller */
return 2;
} else
return 0;
}
/*
* Copyright (C) 1999-2002, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* C99
* This is ASCII with \uXXXX and \UXXXXXXXX escape sequences, denoting Unicode
* characters. See ISO/IEC 9899:1999, section 6.4.3.
* The treatment of control characters in the range U+0080..U+009F is not
* specified; we pass them through unmodified.
*/
static int
c99_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c;
ucs4_t wc;
int i;
c = s[0];
if (c < 0xa0) {
if (c != '\\') {
*pwc = c;
return 1;
}
if (n < 2)
return RET_TOOFEW(0);
c = s[1];
if (c == 'u') {
wc = 0;
for (i = 2; i < 6; i++) {
if (n <= i)
return RET_TOOFEW(0);
c = s[i];
if (c >= '0' && c <= '9')
c -= '0';
else if (c >= 'A' && c <= 'Z')
c -= 'A'-10;
else if (c >= 'a' && c <= 'z')
c -= 'a'-10;
else
goto simply_backslash;
wc |= (ucs4_t) c << (4 * (5-i));
}
if ((wc >= 0x00a0 && !(wc >= 0xd800 && wc < 0xe000))
|| wc == 0x0024 || wc == 0x0040 || wc == 0x0060) {
*pwc = wc;
return 6;
}
} else if (c == 'U') {
wc = 0;
for (i = 2; i < 10; i++) {
if (n <= i)
return RET_TOOFEW(0);
c = s[i];
if (c >= '0' && c <= '9')
c -= '0';
else if (c >= 'A' && c <= 'Z')
c -= 'A'-10;
else if (c >= 'a' && c <= 'z')
c -= 'a'-10;
else
goto simply_backslash;
wc |= (ucs4_t) c << (4 * (9-i));
}
if ((wc >= 0x00a0 && !(wc >= 0xd800 && wc < 0xe000))
|| wc == 0x0024 || wc == 0x0040 || wc == 0x0060) {
*pwc = wc;
return 10;
}
} else
goto simply_backslash;
}
return RET_ILSEQ;
simply_backslash:
*pwc = '\\';
return 1;
}
static int
c99_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
if (wc < 0xa0) {
*r = wc;
return 1;
} else {
int result;
unsigned char u;
if (wc < 0x10000) {
result = 6;
u = 'u';
} else {
result = 10;
u = 'U';
}
if (n >= result) {
int count;
r[0] = '\\';
r[1] = u;
r += 2;
for (count = result-3; count >= 0; count--) {
unsigned int i = (wc >> (4*count)) & 0x0f;
*r++ = (i < 10 ? '0'+i : 'a'-10+i);
}
return result;
} else
return RET_TOOSMALL;
}
}
(int)(long)&((struct stringpool_t *)0)->stringpool_str392,
(int)(long)&((struct stringpool_t *)0)->stringpool_str389,
(int)(long)&((struct stringpool_t *)0)->stringpool_str258,
(int)(long)&((struct stringpool_t *)0)->stringpool_str436,
(int)(long)&((struct stringpool_t *)0)->stringpool_str285,
(int)(long)&((struct stringpool_t *)0)->stringpool_str222,
(int)(long)&((struct stringpool_t *)0)->stringpool_str418,
(int)(long)&((struct stringpool_t *)0)->stringpool_str267,
(int)(long)&((struct stringpool_t *)0)->stringpool_str361,
(int)(long)&((struct stringpool_t *)0)->stringpool_str567,
(int)(long)&((struct stringpool_t *)0)->stringpool_str416,
(int)(long)&((struct stringpool_t *)0)->stringpool_str512,
(int)(long)&((struct stringpool_t *)0)->stringpool_str690,
(int)(long)&((struct stringpool_t *)0)->stringpool_str539,
(int)(long)&((struct stringpool_t *)0)->stringpool_str689,
(int)(long)&((struct stringpool_t *)0)->stringpool_str320,
(int)(long)&((struct stringpool_t *)0)->stringpool_str750,
(int)(long)&((struct stringpool_t *)0)->stringpool_str302,
(int)(long)&((struct stringpool_t *)0)->stringpool_str732,
(int)(long)&((struct stringpool_t *)0)->stringpool_str64,
(int)(long)&((struct stringpool_t *)0)->stringpool_str811,
(int)(long)&((struct stringpool_t *)0)->stringpool_str134,
(int)(long)&((struct stringpool_t *)0)->stringpool_str186,
(int)(long)&((struct stringpool_t *)0)->stringpool_str324,
(int)(long)&((struct stringpool_t *)0)->stringpool_str150,
(int)(long)&((struct stringpool_t *)0)->stringpool_str154,
(int)(long)&((struct stringpool_t *)0)->stringpool_str130,
(int)(long)&((struct stringpool_t *)0)->stringpool_str466,
(int)(long)&((struct stringpool_t *)0)->stringpool_str166,
(int)(long)&((struct stringpool_t *)0)->stringpool_str170,
(int)(long)&((struct stringpool_t *)0)->stringpool_str322,
(int)(long)&((struct stringpool_t *)0)->stringpool_str142,
(int)(long)&((struct stringpool_t *)0)->stringpool_str332,
(int)(long)&((struct stringpool_t *)0)->stringpool_str158,
(int)(long)&((struct stringpool_t *)0)->stringpool_str162,
(int)(long)&((struct stringpool_t *)0)->stringpool_str138,
(int)(long)&((struct stringpool_t *)0)->stringpool_str236,
(int)(long)&((struct stringpool_t *)0)->stringpool_str574,
(int)(long)&((struct stringpool_t *)0)->stringpool_str580,
(int)(long)&((struct stringpool_t *)0)->stringpool_str268,
(int)(long)&((struct stringpool_t *)0)->stringpool_str88,
(int)(long)&((struct stringpool_t *)0)->stringpool_str140,
(int)(long)&((struct stringpool_t *)0)->stringpool_str278,
(int)(long)&((struct stringpool_t *)0)->stringpool_str104,
(int)(long)&((struct stringpool_t *)0)->stringpool_str108,
(int)(long)&((struct stringpool_t *)0)->stringpool_str84,
(int)(long)&((struct stringpool_t *)0)->stringpool_str420,
(int)(long)&((struct stringpool_t *)0)->stringpool_str120,
(int)(long)&((struct stringpool_t *)0)->stringpool_str250,
(int)(long)&((struct stringpool_t *)0)->stringpool_str110,
(int)(long)&((struct stringpool_t *)0)->stringpool_str54,
(int)(long)&((struct stringpool_t *)0)->stringpool_str147,
(int)(long)&((struct stringpool_t *)0)->stringpool_str476,
(int)(long)&((struct stringpool_t *)0)->stringpool_str463,
(int)(long)&((struct stringpool_t *)0)->stringpool_str442,
(int)(long)&((struct stringpool_t *)0)->stringpool_str562,
(int)(long)&((struct stringpool_t *)0)->stringpool_str813,
(int)(long)&((struct stringpool_t *)0)->stringpool_str248,
(int)(long)&((struct stringpool_t *)0)->stringpool_str749,
(int)(long)&((struct stringpool_t *)0)->stringpool_str591,
(int)(long)&((struct stringpool_t *)0)->stringpool_str702,
(int)(long)&((struct stringpool_t *)0)->stringpool_str796,
(int)(long)&((struct stringpool_t *)0)->stringpool_str680,
(int)(long)&((struct stringpool_t *)0)->stringpool_str430,
(int)(long)&((struct stringpool_t *)0)->stringpool_str448,
(int)(long)&((struct stringpool_t *)0)->stringpool_str311,
(int)(long)&((struct stringpool_t *)0)->stringpool_str391,
(int)(long)&((struct stringpool_t *)0)->stringpool_str446,
(int)(long)&((struct stringpool_t *)0)->stringpool_str312,
(int)(long)&((struct stringpool_t *)0)->stringpool_str286,
(int)(long)&((struct stringpool_t *)0)->stringpool_str121,
(int)(long)&((struct stringpool_t *)0)->stringpool_str176,
(int)(long)&((struct stringpool_t *)0)->stringpool_str375,
(int)(long)&((struct stringpool_t *)0)->stringpool_str337,
(int)(long)&((struct stringpool_t *)0)->stringpool_str282,
(int)(long)&((struct stringpool_t *)0)->stringpool_str242,
(int)(long)&((struct stringpool_t *)0)->stringpool_str206,
(int)(long)&((struct stringpool_t *)0)->stringpool_str211,
(int)(long)&((struct stringpool_t *)0)->stringpool_str536,
(int)(long)&((struct stringpool_t *)0)->stringpool_str651,
(int)(long)&((struct stringpool_t *)0)->stringpool_str683,
(int)(long)&((struct stringpool_t *)0)->stringpool_str613,
(int)(long)&((struct stringpool_t *)0)->stringpool_str329,
(int)(long)&((struct stringpool_t *)0)->stringpool_str426,
(int)(long)&((struct stringpool_t *)0)->stringpool_str89,
(int)(long)&((struct stringpool_t *)0)->stringpool_str344,
(int)(long)&((struct stringpool_t *)0)->stringpool_str479,
(int)(long)&((struct stringpool_t *)0)->stringpool_str548,
(int)(long)&((struct stringpool_t *)0)->stringpool_str209,
(int)(long)&((struct stringpool_t *)0)->stringpool_str661,
(int)(long)&((struct stringpool_t *)0)->stringpool_str608,
(int)(long)&((struct stringpool_t *)0)->stringpool_str634,
(int)(long)&((struct stringpool_t *)0)->stringpool_str610,
(int)(long)&((struct stringpool_t *)0)->stringpool_str72,
(int)(long)&((struct stringpool_t *)0)->stringpool_str388,
(int)(long)&((struct stringpool_t *)0)->stringpool_str153,
(int)(long)&((struct stringpool_t *)0)->stringpool_str443,
(int)(long)&((struct stringpool_t *)0)->stringpool_str254,
(int)(long)&((struct stringpool_t *)0)->stringpool_str281,
(int)(long)&((struct stringpool_t *)0)->stringpool_str78,
(int)(long)&((struct stringpool_t *)0)->stringpool_str437,
(int)(long)&((struct stringpool_t *)0)->stringpool_str210,
(int)(long)&((struct stringpool_t *)0)->stringpool_str252,
(int)(long)&((struct stringpool_t *)0)->stringpool_str710,
(int)(long)&((struct stringpool_t *)0)->stringpool_str692,
(int)(long)&((struct stringpool_t *)0)->stringpool_str700,
(int)(long)&((struct stringpool_t *)0)->stringpool_str495,
(int)(long)&((struct stringpool_t *)0)->stringpool_str243,
(int)(long)&((struct stringpool_t *)0)->stringpool_str106,
(int)(long)&((struct stringpool_t *)0)->stringpool_str869,
(int)(long)&((struct stringpool_t *)0)->stringpool_str425,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_0,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_1,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_2,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_3,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_4,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_5,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_6,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_10,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_14,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_0,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_2,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_4,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_6,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_8,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_10,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_12,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_16,
(int)(long)&((struct stringpool2_t *)0)->stringpool_aix_20,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_0,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_4,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_5,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_8,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_12,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_13,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_17,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_21,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_22,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_26,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_31,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_35,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_38,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_42,
(int)(long)&((struct stringpool2_t *)0)->stringpool_dos_47,
(int)(long)&((struct stringpool2_t *)0)->stringpool_extra_0,
(int)(long)&((struct stringpool2_t *)0)->stringpool_extra_2,
(int)(long)&((struct stringpool2_t *)0)->stringpool_extra_4,
(int)(long)&((struct stringpool2_t *)0)->stringpool_extra_6,
(int)(long)&((struct stringpool2_t *)0)->stringpool_extra_7,
(int)(long)&((struct stringpool2_t *)0)->stringpool_extra_9,
(int)(long)&((struct stringpool2_t *)0)->stringpool_extra_11,
(int)(long)&((struct stringpool_t *)0)->stringpool_str193,
(int)(long)&((struct stringpool_t *)0)->stringpool_str496,
(int)(long)&((struct stringpool_t *)0)->stringpool_str15,
(int)(long)&((struct stringpool_t *)0)->stringpool_str484,
(int)(long)&((struct stringpool_t *)0)->stringpool_str171,
(int)(long)&((struct stringpool_t *)0)->stringpool_str723,
(int)(long)&((struct stringpool_t *)0)->stringpool_str193,
(int)(long)&((struct stringpool_t *)0)->stringpool_str457,
(int)(long)&((struct stringpool_t *)0)->stringpool_str112,
(int)(long)&((struct stringpool_t *)0)->stringpool_str491,
(int)(long)&((struct stringpool2_t *)0)->stringpool_osf1_0,
(int)(long)&((struct stringpool2_t *)0)->stringpool_osf1_1,
(int)(long)&((struct stringpool2_t *)0)->stringpool_osf1_0,
(int)(long)&((struct stringpool2_t *)0)->stringpool_osf1_2,
(int)(long)&((struct stringpool_t *)0)->stringpool_str391,
(int)(long)&((struct stringpool_t *)0)->stringpool_str282,
(int)(long)&((struct stringpool_t *)0)->stringpool_str145,
(int)(long)&((struct stringpool_t *)0)->stringpool_str452,
(int)(long)&((struct stringpool_t *)0)->stringpool_str267,
(int)(long)&((struct stringpool_t *)0)->stringpool_str131,
(int)(long)&((struct stringpool_t *)0)->stringpool_str445,
(int)(long)&((struct stringpool_t *)0)->stringpool_str260,
(int)(long)&((struct stringpool_t *)0)->stringpool_str255,
(int)(long)&((struct stringpool_t *)0)->stringpool_str573,
(int)(long)&((struct stringpool_t *)0)->stringpool_str388,
(int)(long)&((struct stringpool_t *)0)->stringpool_str303,
(int)(long)&((struct stringpool_t *)0)->stringpool_str610,
(int)(long)&((struct stringpool_t *)0)->stringpool_str425,
(int)(long)&((struct stringpool_t *)0)->stringpool_str618,
(int)(long)&((struct stringpool_t *)0)->stringpool_str418,
(int)(long)&((struct stringpool_t *)0)->stringpool_str469,
(int)(long)&((struct stringpool_t *)0)->stringpool_str411,
(int)(long)&((struct stringpool_t *)0)->stringpool_str462,
(int)(long)&((struct stringpool_t *)0)->stringpool_str5,
(int)(long)&((struct stringpool_t *)0)->stringpool_str457,
(int)(long)&((struct stringpool_t *)0)->stringpool_str155,
(int)(long)&((struct stringpool_t *)0)->stringpool_str183,
(int)(long)&((struct stringpool_t *)0)->stringpool_str207,
(int)(long)&((struct stringpool_t *)0)->stringpool_str169,
(int)(long)&((struct stringpool_t *)0)->stringpool_str177,
(int)(long)&((struct stringpool_t *)0)->stringpool_str161,
(int)(long)&((struct stringpool_t *)0)->stringpool_str527,
(int)(long)&((struct stringpool_t *)0)->stringpool_str191,
(int)(long)&((struct stringpool_t *)0)->stringpool_str151,
(int)(long)&((struct stringpool_t *)0)->stringpool_str242,
(int)(long)&((struct stringpool_t *)0)->stringpool_str158,
(int)(long)&((struct stringpool_t *)0)->stringpool_str210,
(int)(long)&((struct stringpool_t *)0)->stringpool_str172,
(int)(long)&((struct stringpool_t *)0)->stringpool_str180,
(int)(long)&((struct stringpool_t *)0)->stringpool_str164,
(int)(long)&((struct stringpool_t *)0)->stringpool_str313,
(int)(long)&((struct stringpool_t *)0)->stringpool_str507,
(int)(long)&((struct stringpool_t *)0)->stringpool_str508,
(int)(long)&((struct stringpool_t *)0)->stringpool_str127,
(int)(long)&((struct stringpool_t *)0)->stringpool_str43,
(int)(long)&((struct stringpool_t *)0)->stringpool_str71,
(int)(long)&((struct stringpool_t *)0)->stringpool_str95,
(int)(long)&((struct stringpool_t *)0)->stringpool_str57,
(int)(long)&((struct stringpool_t *)0)->stringpool_str65,
(int)(long)&((struct stringpool_t *)0)->stringpool_str49,
(int)(long)&((struct stringpool_t *)0)->stringpool_str415,
(int)(long)&((struct stringpool_t *)0)->stringpool_str79,
(int)(long)&((struct stringpool_t *)0)->stringpool_str128,
(int)(long)&((struct stringpool_t *)0)->stringpool_str64,
(int)(long)&((struct stringpool_t *)0)->stringpool_str42,
(int)(long)&((struct stringpool_t *)0)->stringpool_str44,
(int)(long)&((struct stringpool_t *)0)->stringpool_str437,
(int)(long)&((struct stringpool_t *)0)->stringpool_str557,
(int)(long)&((struct stringpool_t *)0)->stringpool_str429,
(int)(long)&((struct stringpool_t *)0)->stringpool_str451,
(int)(long)&((struct stringpool_t *)0)->stringpool_str542,
(int)(long)&((struct stringpool_t *)0)->stringpool_str426,
(int)(long)&((struct stringpool_t *)0)->stringpool_str744,
(int)(long)&((struct stringpool_t *)0)->stringpool_str809,
(int)(long)&((struct stringpool_t *)0)->stringpool_str815,
(int)(long)&((struct stringpool_t *)0)->stringpool_str958,
(int)(long)&((struct stringpool_t *)0)->stringpool_str518,
(int)(long)&((struct stringpool_t *)0)->stringpool_str560,
(int)(long)&((struct stringpool_t *)0)->stringpool_str309,
(int)(long)&((struct stringpool_t *)0)->stringpool_str647,
(int)(long)&((struct stringpool_t *)0)->stringpool_str453,
(int)(long)&((struct stringpool_t *)0)->stringpool_str270,
(int)(long)&((struct stringpool_t *)0)->stringpool_str315,
(int)(long)&((struct stringpool_t *)0)->stringpool_str549,
(int)(long)&((struct stringpool_t *)0)->stringpool_str90,
(int)(long)&((struct stringpool_t *)0)->stringpool_str101,
(int)(long)&((struct stringpool_t *)0)->stringpool_str305,
(int)(long)&((struct stringpool_t *)0)->stringpool_str96,
(int)(long)&((struct stringpool_t *)0)->stringpool_str245,
(int)(long)&((struct stringpool_t *)0)->stringpool_str233,
(int)(long)&((struct stringpool_t *)0)->stringpool_str342,
(int)(long)&((struct stringpool_t *)0)->stringpool_str187,
(int)(long)&((struct stringpool_t *)0)->stringpool_str490,
(int)(long)&((struct stringpool_t *)0)->stringpool_str725,
(int)(long)&((struct stringpool_t *)0)->stringpool_str761,
(int)(long)&((struct stringpool_t *)0)->stringpool_str711,
(int)(long)&((struct stringpool_t *)0)->stringpool_str226,
(int)(long)&((struct stringpool_t *)0)->stringpool_str246,
(int)(long)&((struct stringpool_t *)0)->stringpool_str219,
(int)(long)&((struct stringpool_t *)0)->stringpool_str276,
(int)(long)&((struct stringpool_t *)0)->stringpool_str553,
(int)(long)&((struct stringpool_t *)0)->stringpool_str853,
(int)(long)&((struct stringpool_t *)0)->stringpool_str67,
(int)(long)&((struct stringpool_t *)0)->stringpool_str671,
(int)(long)&((struct stringpool_t *)0)->stringpool_str623,
(int)(long)&((struct stringpool_t *)0)->stringpool_str637,
(int)(long)&((struct stringpool_t *)0)->stringpool_str633,
(int)(long)&((struct stringpool_t *)0)->stringpool_str81,
(int)(long)&((struct stringpool_t *)0)->stringpool_str466,
(int)(long)&((struct stringpool_t *)0)->stringpool_str45,
(int)(long)&((struct stringpool_t *)0)->stringpool_str254,
(int)(long)&((struct stringpool_t *)0)->stringpool_str199,
(int)(long)&((struct stringpool_t *)0)->stringpool_str318,
(int)(long)&((struct stringpool_t *)0)->stringpool_str48,
(int)(long)&((struct stringpool_t *)0)->stringpool_str569,
(int)(long)&((struct stringpool_t *)0)->stringpool_str286,
(int)(long)&((struct stringpool_t *)0)->stringpool_str108,
(int)(long)&((struct stringpool_t *)0)->stringpool_str719,
(int)(long)&((struct stringpool_t *)0)->stringpool_str721,
(int)(long)&((struct stringpool_t *)0)->stringpool_str728,
(int)(long)&((struct stringpool_t *)0)->stringpool_str555,
(int)(long)&((struct stringpool_t *)0)->stringpool_str272,
(int)(long)&((struct stringpool_t *)0)->stringpool_str16,
(int)(long)&((struct stringpool_t *)0)->stringpool_str814,
(int)(long)&((struct stringpool_t *)0)->stringpool_str390,
(int)(long)&((struct stringpool_t *)0)->stringpool_str396,
(int)(long)&((struct stringpool_t *)0)->stringpool_str355,
(int)(long)&((struct stringpool_t *)0)->stringpool_str293,
(int)(long)&((struct stringpool_t *)0)->stringpool_str499,
(int)(long)&((struct stringpool_t *)0)->stringpool_str345,
(int)(long)&((struct stringpool_t *)0)->stringpool_str267,
(int)(long)&((struct stringpool_t *)0)->stringpool_str486,
(int)(long)&((struct stringpool_t *)0)->stringpool_str332,
(int)(long)&((struct stringpool_t *)0)->stringpool_str322,
(int)(long)&((struct stringpool_t *)0)->stringpool_str553,
(int)(long)&((struct stringpool_t *)0)->stringpool_str399,
(int)(long)&((struct stringpool_t *)0)->stringpool_str430,
(int)(long)&((struct stringpool_t *)0)->stringpool_str636,
(int)(long)&((struct stringpool_t *)0)->stringpool_str482,
(int)(long)&((struct stringpool_t *)0)->stringpool_str495,
(int)(long)&((struct stringpool_t *)0)->stringpool_str503,
(int)(long)&((struct stringpool_t *)0)->stringpool_str500,
(int)(long)&((struct stringpool_t *)0)->stringpool_str490,
(int)(long)&((struct stringpool_t *)0)->stringpool_str487,
(int)(long)&((struct stringpool_t *)0)->stringpool_str110,
(int)(long)&((struct stringpool_t *)0)->stringpool_str639,
(int)(long)&((struct stringpool_t *)0)->stringpool_str114,
(int)(long)&((struct stringpool_t *)0)->stringpool_str178,
(int)(long)&((struct stringpool_t *)0)->stringpool_str230,
(int)(long)&((struct stringpool_t *)0)->stringpool_str152,
(int)(long)&((struct stringpool_t *)0)->stringpool_str142,
(int)(long)&((struct stringpool_t *)0)->stringpool_str128,
(int)(long)&((struct stringpool_t *)0)->stringpool_str306,
(int)(long)&((struct stringpool_t *)0)->stringpool_str166,
(int)(long)&((struct stringpool_t *)0)->stringpool_str112,
(int)(long)&((struct stringpool_t *)0)->stringpool_str223,
(int)(long)&((struct stringpool_t *)0)->stringpool_str119,
(int)(long)&((struct stringpool_t *)0)->stringpool_str235,
(int)(long)&((struct stringpool_t *)0)->stringpool_str157,
(int)(long)&((struct stringpool_t *)0)->stringpool_str147,
(int)(long)&((struct stringpool_t *)0)->stringpool_str133,
(int)(long)&((struct stringpool_t *)0)->stringpool_str100,
(int)(long)&((struct stringpool_t *)0)->stringpool_str516,
(int)(long)&((struct stringpool_t *)0)->stringpool_str519,
(int)(long)&((struct stringpool_t *)0)->stringpool_str277,
(int)(long)&((struct stringpool_t *)0)->stringpool_str173,
(int)(long)&((struct stringpool_t *)0)->stringpool_str237,
(int)(long)&((struct stringpool_t *)0)->stringpool_str289,
(int)(long)&((struct stringpool_t *)0)->stringpool_str211,
(int)(long)&((struct stringpool_t *)0)->stringpool_str201,
(int)(long)&((struct stringpool_t *)0)->stringpool_str187,
(int)(long)&((struct stringpool_t *)0)->stringpool_str365,
(int)(long)&((struct stringpool_t *)0)->stringpool_str225,
(int)(long)&((struct stringpool_t *)0)->stringpool_str266,
(int)(long)&((struct stringpool_t *)0)->stringpool_str219,
(int)(long)&((struct stringpool_t *)0)->stringpool_str169,
(int)(long)&((struct stringpool_t *)0)->stringpool_str185,
(int)(long)&((struct stringpool_t *)0)->stringpool_str515,
(int)(long)&((struct stringpool_t *)0)->stringpool_str731,
(int)(long)&((struct stringpool_t *)0)->stringpool_str501,
(int)(long)&((struct stringpool_t *)0)->stringpool_str696,
(int)(long)&((struct stringpool_t *)0)->stringpool_str626,
(int)(long)&((struct stringpool_t *)0)->stringpool_str610,
(int)(long)&((struct stringpool_t *)0)->stringpool_str680,
(int)(long)&((struct stringpool_t *)0)->stringpool_str518,
(int)(long)&((struct stringpool_t *)0)->stringpool_str1033,
(int)(long)&((struct stringpool_t *)0)->stringpool_str986,
(int)(long)&((struct stringpool_t *)0)->stringpool_str760,
(int)(long)&((struct stringpool_t *)0)->stringpool_str655,
(int)(long)&((struct stringpool_t *)0)->stringpool_str479,
(int)(long)&((struct stringpool_t *)0)->stringpool_str584,
(int)(long)&((struct stringpool_t *)0)->stringpool_str393,
(int)(long)&((struct stringpool_t *)0)->stringpool_str436,
(int)(long)&((struct stringpool_t *)0)->stringpool_str273,
(int)(long)&((struct stringpool_t *)0)->stringpool_str418,
(int)(long)&((struct stringpool_t *)0)->stringpool_str76,
(int)(long)&((struct stringpool_t *)0)->stringpool_str151,
(int)(long)&((struct stringpool_t *)0)->stringpool_str305,
(int)(long)&((struct stringpool_t *)0)->stringpool_str301,
(int)(long)&((struct stringpool_t *)0)->stringpool_str333,
(int)(long)&((struct stringpool_t *)0)->stringpool_str282,
(int)(long)&((struct stringpool_t *)0)->stringpool_str256,
(int)(long)&((struct stringpool_t *)0)->stringpool_str337,
(int)(long)&((struct stringpool_t *)0)->stringpool_str653,
(int)(long)&((struct stringpool_t *)0)->stringpool_str738,
(int)(long)&((struct stringpool_t *)0)->stringpool_str790,
(int)(long)&((struct stringpool_t *)0)->stringpool_str750,
(int)(long)&((struct stringpool_t *)0)->stringpool_str302,
(int)(long)&((struct stringpool_t *)0)->stringpool_str373,
(int)(long)&((struct stringpool_t *)0)->stringpool_str81,
(int)(long)&((struct stringpool_t *)0)->stringpool_str260,
(int)(long)&((struct stringpool_t *)0)->stringpool_str525,
(int)(long)&((struct stringpool_t *)0)->stringpool_str644,
(int)(long)&((struct stringpool_t *)0)->stringpool_str243,
(int)(long)&((struct stringpool_t *)0)->stringpool_str571,
(int)(long)&((struct stringpool_t *)0)->stringpool_str574,
(int)(long)&((struct stringpool_t *)0)->stringpool_str606,
(int)(long)&((struct stringpool_t *)0)->stringpool_str575,
(int)(long)&((struct stringpool_t *)0)->stringpool_str281,
(int)(long)&((struct stringpool_t *)0)->stringpool_str191,
(int)(long)&((struct stringpool_t *)0)->stringpool_str193,
(int)(long)&((struct stringpool_t *)0)->stringpool_str349,
(int)(long)&((struct stringpool_t *)0)->stringpool_str327,
(int)(long)&((struct stringpool_t *)0)->stringpool_str474,
(int)(long)&((struct stringpool_t *)0)->stringpool_str176,
(int)(long)&((struct stringpool_t *)0)->stringpool_str621,
(int)(long)&((struct stringpool_t *)0)->stringpool_str288,
(int)(long)&((struct stringpool_t *)0)->stringpool_str239,
(int)(long)&((struct stringpool_t *)0)->stringpool_str734,
(int)(long)&((struct stringpool_t *)0)->stringpool_str735,
(int)(long)&((struct stringpool_t *)0)->stringpool_str754,
(int)(long)&((struct stringpool_t *)0)->stringpool_str615,
(int)(long)&((struct stringpool_t *)0)->stringpool_str203,
(int)(long)&((struct stringpool_t *)0)->stringpool_str138,
(int)(long)&((struct stringpool_t *)0)->stringpool_str951,
(int)(long)&((struct stringpool_t *)0)->stringpool_str249,
(int)(long)&((struct stringpool_t *)0)->stringpool_str453,
(int)(long)&((struct stringpool_t *)0)->stringpool_str308,
(int)(long)&((struct stringpool_t *)0)->stringpool_str319,
(int)(long)&((struct stringpool_t *)0)->stringpool_str586,
(int)(long)&((struct stringpool_t *)0)->stringpool_str346,
(int)(long)&((struct stringpool_t *)0)->stringpool_str283,
(int)(long)&((struct stringpool_t *)0)->stringpool_str568,
(int)(long)&((struct stringpool_t *)0)->stringpool_str328,
(int)(long)&((struct stringpool_t *)0)->stringpool_str280,
(int)(long)&((struct stringpool_t *)0)->stringpool_str575,
(int)(long)&((struct stringpool_t *)0)->stringpool_str335,
(int)(long)&((struct stringpool_t *)0)->stringpool_str431,
(int)(long)&((struct stringpool_t *)0)->stringpool_str698,
(int)(long)&((struct stringpool_t *)0)->stringpool_str458,
(int)(long)&((struct stringpool_t *)0)->stringpool_str608,
(int)(long)&((struct stringpool_t *)0)->stringpool_str381,
(int)(long)&((struct stringpool_t *)0)->stringpool_str911,
(int)(long)&((struct stringpool_t *)0)->stringpool_str363,
(int)(long)&((struct stringpool_t *)0)->stringpool_str893,
(int)(long)&((struct stringpool_t *)0)->stringpool_str64,
(int)(long)&((struct stringpool_t *)0)->stringpool_str664,
(int)(long)&((struct stringpool_t *)0)->stringpool_str134,
(int)(long)&((struct stringpool_t *)0)->stringpool_str186,
(int)(long)&((struct stringpool_t *)0)->stringpool_str324,
(int)(long)&((struct stringpool_t *)0)->stringpool_str150,
(int)(long)&((struct stringpool_t *)0)->stringpool_str154,
(int)(long)&((struct stringpool_t *)0)->stringpool_str130,
(int)(long)&((struct stringpool_t *)0)->stringpool_str466,
(int)(long)&((struct stringpool_t *)0)->stringpool_str166,
(int)(long)&((struct stringpool_t *)0)->stringpool_str170,
(int)(long)&((struct stringpool_t *)0)->stringpool_str322,
(int)(long)&((struct stringpool_t *)0)->stringpool_str142,
(int)(long)&((struct stringpool_t *)0)->stringpool_str332,
(int)(long)&((struct stringpool_t *)0)->stringpool_str158,
(int)(long)&((struct stringpool_t *)0)->stringpool_str162,
(int)(long)&((struct stringpool_t *)0)->stringpool_str138,
(int)(long)&((struct stringpool_t *)0)->stringpool_str203,
(int)(long)&((struct stringpool_t *)0)->stringpool_str663,
(int)(long)&((struct stringpool_t *)0)->stringpool_str669,
(int)(long)&((struct stringpool_t *)0)->stringpool_str268,
(int)(long)&((struct stringpool_t *)0)->stringpool_str88,
(int)(long)&((struct stringpool_t *)0)->stringpool_str140,
(int)(long)&((struct stringpool_t *)0)->stringpool_str278,
(int)(long)&((struct stringpool_t *)0)->stringpool_str104,
(int)(long)&((struct stringpool_t *)0)->stringpool_str108,
(int)(long)&((struct stringpool_t *)0)->stringpool_str84,
(int)(long)&((struct stringpool_t *)0)->stringpool_str420,
(int)(long)&((struct stringpool_t *)0)->stringpool_str120,
(int)(long)&((struct stringpool_t *)0)->stringpool_str250,
(int)(long)&((struct stringpool_t *)0)->stringpool_str110,
(int)(long)&((struct stringpool_t *)0)->stringpool_str54,
(int)(long)&((struct stringpool_t *)0)->stringpool_str147,
(int)(long)&((struct stringpool_t *)0)->stringpool_str476,
(int)(long)&((struct stringpool_t *)0)->stringpool_str463,
(int)(long)&((struct stringpool_t *)0)->stringpool_str430,
(int)(long)&((struct stringpool_t *)0)->stringpool_str562,
(int)(long)&((struct stringpool_t *)0)->stringpool_str813,
(int)(long)&((struct stringpool_t *)0)->stringpool_str225,
(int)(long)&((struct stringpool_t *)0)->stringpool_str777,
(int)(long)&((struct stringpool_t *)0)->stringpool_str541,
(int)(long)&((struct stringpool_t *)0)->stringpool_str648,
(int)(long)&((struct stringpool_t *)0)->stringpool_str848,
(int)(long)&((struct stringpool_t *)0)->stringpool_str769,
(int)(long)&((struct stringpool_t *)0)->stringpool_str389,
(int)(long)&((struct stringpool_t *)0)->stringpool_str407,
(int)(long)&((struct stringpool_t *)0)->stringpool_str561,
(int)(long)&((struct stringpool_t *)0)->stringpool_str391,
(int)(long)&((struct stringpool_t *)0)->stringpool_str455,
(int)(long)&((struct stringpool_t *)0)->stringpool_str396,
(int)(long)&((struct stringpool_t *)0)->stringpool_str253,
(int)(long)&((struct stringpool_t *)0)->stringpool_str173,
(int)(long)&((struct stringpool_t *)0)->stringpool_str176,
(int)(long)&((struct stringpool_t *)0)->stringpool_str375,
(int)(long)&((struct stringpool_t *)0)->stringpool_str337,
(int)(long)&((struct stringpool_t *)0)->stringpool_str282,
(int)(long)&((struct stringpool_t *)0)->stringpool_str242,
(int)(long)&((struct stringpool_t *)0)->stringpool_str228,
(int)(long)&((struct stringpool_t *)0)->stringpool_str233,
(int)(long)&((struct stringpool_t *)0)->stringpool_str367,
(int)(long)&((struct stringpool_t *)0)->stringpool_str628,
(int)(long)&((struct stringpool_t *)0)->stringpool_str660,
(int)(long)&((struct stringpool_t *)0)->stringpool_str590,
(int)(long)&((struct stringpool_t *)0)->stringpool_str345,
(int)(long)&((struct stringpool_t *)0)->stringpool_str442,
(int)(long)&((struct stringpool_t *)0)->stringpool_str89,
(int)(long)&((struct stringpool_t *)0)->stringpool_str311,
(int)(long)&((struct stringpool_t *)0)->stringpool_str414,
(int)(long)&((struct stringpool_t *)0)->stringpool_str237,
(int)(long)&((struct stringpool_t *)0)->stringpool_str209,
(int)(long)&((struct stringpool_t *)0)->stringpool_str596,
(int)(long)&((struct stringpool_t *)0)->stringpool_str491,
(int)(long)&((struct stringpool_t *)0)->stringpool_str517,
(int)(long)&((struct stringpool_t *)0)->stringpool_str493,
(int)(long)&((struct stringpool_t *)0)->stringpool_str72,
(int)(long)&((struct stringpool_t *)0)->stringpool_str338,
(int)(long)&((struct stringpool_t *)0)->stringpool_str153,
(int)(long)&((struct stringpool_t *)0)->stringpool_str459,
(int)(long)&((struct stringpool_t *)0)->stringpool_str254,
(int)(long)&((struct stringpool_t *)0)->stringpool_str281,
(int)(long)&((struct stringpool_t *)0)->stringpool_str49,
(int)(long)&((struct stringpool_t *)0)->stringpool_str441,
(int)(long)&((struct stringpool_t *)0)->stringpool_str315,
(int)(long)&((struct stringpool_t *)0)->stringpool_str252,
(int)(long)&((struct stringpool_t *)0)->stringpool_str846,
(int)(long)&((struct stringpool_t *)0)->stringpool_str828,
(int)(long)&((struct stringpool_t *)0)->stringpool_str836,
(int)(long)&((struct stringpool_t *)0)->stringpool_str526,
(int)(long)&((struct stringpool_t *)0)->stringpool_str210,
(int)(long)&((struct stringpool_t *)0)->stringpool_str106,
(int)(long)&((struct stringpool_t *)0)->stringpool_str837,
(int)(long)&((struct stringpool_t *)0)->stringpool_str392,
(int)(long)&((struct stringpool_t *)0)->stringpool_str239,
(int)(long)&((struct stringpool_t *)0)->stringpool_str275,
(int)(long)&((struct stringpool_t *)0)->stringpool_str218,
(int)(long)&((struct stringpool_t *)0)->stringpool_str532,
(int)(long)&((struct stringpool_t *)0)->stringpool_str517,
(int)(long)&((struct stringpool_t *)0)->stringpool_str264,
(int)(long)&((struct stringpool_t *)0)->stringpool_str555,
(int)(long)&((struct stringpool_t *)0)->stringpool_str540,
(int)(long)&((struct stringpool_t *)0)->stringpool_str272,
(int)(long)&((struct stringpool_t *)0)->stringpool_str591,
(int)(long)&((struct stringpool_t *)0)->stringpool_str576,
(int)(long)&((struct stringpool_t *)0)->stringpool_str365,
(int)(long)&((struct stringpool_t *)0)->stringpool_str679,
(int)(long)&((struct stringpool_t *)0)->stringpool_str664,
(int)(long)&((struct stringpool_t *)0)->stringpool_str603,
(int)(long)&((struct stringpool_t *)0)->stringpool_str530,
(int)(long)&((struct stringpool_t *)0)->stringpool_str797,
(int)(long)&((struct stringpool_t *)0)->stringpool_str553,
(int)(long)&((struct stringpool_t *)0)->stringpool_str820,
(int)(long)&((struct stringpool_t *)0)->stringpool_str19,
(int)(long)&((struct stringpool_t *)0)->stringpool_str330,
(int)(long)&((struct stringpool_t *)0)->stringpool_str61,
(int)(long)&((struct stringpool_t *)0)->stringpool_str73,
(int)(long)&((struct stringpool_t *)0)->stringpool_str227,
(int)(long)&((struct stringpool_t *)0)->stringpool_str119,
(int)(long)&((struct stringpool_t *)0)->stringpool_str65,
(int)(long)&((struct stringpool_t *)0)->stringpool_str63,
(int)(long)&((struct stringpool_t *)0)->stringpool_str397,
(int)(long)&((struct stringpool_t *)0)->stringpool_str69,
(int)(long)&((struct stringpool_t *)0)->stringpool_str71,
(int)(long)&((struct stringpool_t *)0)->stringpool_str128,
(int)(long)&((struct stringpool_t *)0)->stringpool_str64,
(int)(long)&((struct stringpool_t *)0)->stringpool_str230,
(int)(long)&((struct stringpool_t *)0)->stringpool_str122,
(int)(long)&((struct stringpool_t *)0)->stringpool_str68,
(int)(long)&((struct stringpool_t *)0)->stringpool_str66,
(int)(long)&((struct stringpool_t *)0)->stringpool_str207,
(int)(long)&((struct stringpool_t *)0)->stringpool_str373,
(int)(long)&((struct stringpool_t *)0)->stringpool_str414,
(int)(long)&((struct stringpool_t *)0)->stringpool_str90,
(int)(long)&((struct stringpool_t *)0)->stringpool_str26,
(int)(long)&((struct stringpool_t *)0)->stringpool_str38,
(int)(long)&((struct stringpool_t *)0)->stringpool_str192,
(int)(long)&((struct stringpool_t *)0)->stringpool_str84,
(int)(long)&((struct stringpool_t *)0)->stringpool_str30,
(int)(long)&((struct stringpool_t *)0)->stringpool_str28,
(int)(long)&((struct stringpool_t *)0)->stringpool_str362,
(int)(long)&((struct stringpool_t *)0)->stringpool_str34,
(int)(long)&((struct stringpool_t *)0)->stringpool_str85,
(int)(long)&((struct stringpool_t *)0)->stringpool_str32,
(int)(long)&((struct stringpool_t *)0)->stringpool_str22,
(int)(long)&((struct stringpool_t *)0)->stringpool_str101,
(int)(long)&((struct stringpool_t *)0)->stringpool_str372,
(int)(long)&((struct stringpool_t *)0)->stringpool_str644,
(int)(long)&((struct stringpool_t *)0)->stringpool_str494,
(int)(long)&((struct stringpool_t *)0)->stringpool_str290,
(int)(long)&((struct stringpool_t *)0)->stringpool_str424,
(int)(long)&((struct stringpool_t *)0)->stringpool_str509,
(int)(long)&((struct stringpool_t *)0)->stringpool_str609,
(int)(long)&((struct stringpool_t *)0)->stringpool_str653,
(int)(long)&((struct stringpool_t *)0)->stringpool_str751,
(int)(long)&((struct stringpool_t *)0)->stringpool_str956,
(int)(long)&((struct stringpool_t *)0)->stringpool_str416,
(int)(long)&((struct stringpool_t *)0)->stringpool_str328,
(int)(long)&((struct stringpool_t *)0)->stringpool_str364,
(int)(long)&((struct stringpool_t *)0)->stringpool_str678,
(int)(long)&((struct stringpool_t *)0)->stringpool_str270,
(int)(long)&((struct stringpool_t *)0)->stringpool_str329,
(int)(long)&((struct stringpool_t *)0)->stringpool_str558,
(int)(long)&((struct stringpool_t *)0)->stringpool_str183,
(int)(long)&((struct stringpool_t *)0)->stringpool_str212,
(int)(long)&((struct stringpool_t *)0)->stringpool_str125,
(int)(long)&((struct stringpool_t *)0)->stringpool_str570,
(int)(long)&((struct stringpool_t *)0)->stringpool_str267,
(int)(long)&((struct stringpool_t *)0)->stringpool_str188,
(int)(long)&((struct stringpool_t *)0)->stringpool_str245,
(int)(long)&((struct stringpool_t *)0)->stringpool_str184,
(int)(long)&((struct stringpool_t *)0)->stringpool_str146,
(int)(long)&((struct stringpool_t *)0)->stringpool_str400,
(int)(long)&((struct stringpool_t *)0)->stringpool_str593,
(int)(long)&((struct stringpool_t *)0)->stringpool_str601,
(int)(long)&((struct stringpool_t *)0)->stringpool_str573,
(int)(long)&((struct stringpool_t *)0)->stringpool_str295,
(int)(long)&((struct stringpool_t *)0)->stringpool_str377,
(int)(long)&((struct stringpool_t *)0)->stringpool_str89,
(int)(long)&((struct stringpool_t *)0)->stringpool_str240,
(int)(long)&((struct stringpool_t *)0)->stringpool_str542,
(int)(long)&((struct stringpool_t *)0)->stringpool_str608,
(int)(long)&((struct stringpool_t *)0)->stringpool_str115,
(int)(long)&((struct stringpool_t *)0)->stringpool_str539,
(int)(long)&((struct stringpool_t *)0)->stringpool_str404,
(int)(long)&((struct stringpool_t *)0)->stringpool_str410,
(int)(long)&((struct stringpool_t *)0)->stringpool_str467,
(int)(long)&((struct stringpool_t *)0)->stringpool_str106,
(int)(long)&((struct stringpool_t *)0)->stringpool_str307,
(int)(long)&((struct stringpool_t *)0)->stringpool_str105,
(int)(long)&((struct stringpool_t *)0)->stringpool_str300,
(int)(long)&((struct stringpool_t *)0)->stringpool_str103,
(int)(long)&((struct stringpool_t *)0)->stringpool_str131,
(int)(long)&((struct stringpool_t *)0)->stringpool_str124,
(int)(long)&((struct stringpool_t *)0)->stringpool_str448,
(int)(long)&((struct stringpool_t *)0)->stringpool_str274,
(int)(long)&((struct stringpool_t *)0)->stringpool_str86,
(int)(long)&((struct stringpool_t *)0)->stringpool_str841,
(int)(long)&((struct stringpool_t *)0)->stringpool_str836,
(int)(long)&((struct stringpool_t *)0)->stringpool_str865,
(int)(long)&((struct stringpool_t *)0)->stringpool_str701,
(int)(long)&((struct stringpool_t *)0)->stringpool_str279,
(int)(long)&((struct stringpool_t *)0)->stringpool_str59,
(int)(long)&((struct stringpool_t *)0)->stringpool_str645,
(int)(long)&((struct stringpool_t *)0)->stringpool_str276,
/*
* Copyright (C) 1999-2001, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* BIG-5
*/
static int
ces_big5_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
/* Code set 0 (ASCII) */
if (c < 0x80)
return ascii_mbtowc(conv,pwc,s,n);
/* Code set 1 (BIG5) */
if (c >= 0xa1 && c < 0xff) {
if (n < 2)
return RET_TOOFEW(0);
{
unsigned char c2 = s[1];
if ((c2 >= 0x40 && c2 < 0x7f) || (c2 >= 0xa1 && c2 < 0xff))
return big5_mbtowc(conv,pwc,s,2);
else
return RET_ILSEQ;
}
}
return RET_ILSEQ;
}
static int
ces_big5_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char buf[2];
int ret;
/* Code set 0 (ASCII) */
ret = ascii_wctomb(conv,r,wc,n);
if (ret != RET_ILUNI)
return ret;
/* Code set 1 (BIG5) */
ret = big5_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (n < 2)
return RET_TOOSMALL;
r[0] = buf[0];
r[1] = buf[1];
return 2;
}
return RET_ILUNI;
}
/*
* Copyright (C) 1999-2001, 2005, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* GBK
*/
static int
ces_gbk_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
/* Code set 0 (ASCII or GB 1988-89) */
if (c < 0x80)
return ascii_mbtowc(conv,pwc,s,n);
/* Code set 1 (GBK) */
if (c >= 0x81 && c < 0xff) {
if (n < 2)
return RET_TOOFEW(0);
return gbk_mbtowc(conv,pwc,s,2);
}
return RET_ILSEQ;
}
static int
ces_gbk_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char buf[2];
int ret;
/* Code set 0 (ASCII or GB 1988-89) */
ret = ascii_wctomb(conv,r,wc,n);
if (ret != RET_ILUNI)
return ret;
/* Code set 1 (GBK) */
ret = gbk_wctomb(conv,buf,wc,2);
if (ret != RET_ILUNI) {
if (ret != 2) abort();
if (n < 2)
return RET_TOOSMALL;
r[0] = buf[0];
r[1] = buf[1];
return 2;
}
return RET_ILUNI;
}
This diff could not be displayed because it is too large.
/*
* Copyright (C) 1999-2001 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* CNS 11643-1992
*/
/* ISO-2022-CN and EUC-TW use CNS 11643-1992 planes 1 to 7. We also
* have a table for the older plane 15. We use a trick to keep the
* Unicode -> CNS 11643 table as small as possible (see cns11643_inv.h).
*/
#include "cns11643_1.h"
#include "cns11643_2.h"
#include "cns11643_3.h"
#include "cns11643_4.h"
#include "cns11643_5.h"
#include "cns11643_6.h"
#include "cns11643_7.h"
#include "cns11643_15.h"
#include "cns11643_inv.h"
/* Returns the plane number (1,...,7,15) in r[0], the two bytes in r[1],r[2]. */
#define cns11643_wctomb cns11643_inv_wctomb
/*
* Copyright (C) 1999-2001, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* CNS 11643-1992 plane 4
*/
/*
* The table has been split into two parts. Each part's entries fit it 16 bits.
* But the combined table would need 17 bits per entry.
*/
#include "cns11643_4a.h"
#include "cns11643_4b.h"
static int
cns11643_4_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c1 = s[0];
if ((c1 >= 0x21 && c1 <= 0x6e)) {
if (n >= 2) {
unsigned char c2 = s[1];
if (c2 >= 0x21 && c2 < 0x7f) {
unsigned int i = 94 * (c1 - 0x21) + (c2 - 0x21);
ucs4_t wc = 0xfffd;
unsigned short swc;
{
if (i < 2914)
swc = cns11643_4a_2uni_page21[i],
wc = cns11643_4a_2uni_upages[swc>>8] | (swc & 0xff);
else if (i < 7298)
swc = cns11643_4b_2uni_page40[i-2914],
wc = cns11643_4b_2uni_upages[swc>>8] | (swc & 0xff);
}
if (wc != 0xfffd) {
*pwc = wc;
return 2;
}
}
return RET_ILSEQ;
}
return RET_TOOFEW(0);
}
return RET_ILSEQ;
}
This diff could not be displayed because it is too large.
/*
* Copyright (C) 1999-2002, 2004-2011, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/* This file defines all the converters. */
/* Our own notion of wide character, as UCS-4, according to ISO-10646-1. */
typedef unsigned int ucs4_t;
/* State used by a conversion. 0 denotes the initial state. */
typedef unsigned int state_t;
/* iconv_t is an opaque type. This is the real iconv_t type. */
typedef struct conv_struct * conv_t;
/*
* Data type for conversion multibyte -> unicode
*/
struct mbtowc_funcs {
int (*xxx_mbtowc) (conv_t conv, ucs4_t *pwc, unsigned char const *s, size_t n);
/*
* int xxx_mbtowc (conv_t conv, ucs4_t *pwc, unsigned char const *s, size_t n)
* converts the byte sequence starting at s to a wide character. Up to n bytes
* are available at s. n is >= 1.
* Result is number of bytes consumed (if a wide character was read),
* or -1 if invalid, or -2 if n too small,
* or RET_SHIFT_ILSEQ(number of bytes consumed) if invalid input after a shift
* sequence was read,
* or RET_TOOFEW(number of bytes consumed) if only a shift sequence was read.
*/
int (*xxx_flushwc) (conv_t conv, ucs4_t *pwc);
/*
* int xxx_flushwc (conv_t conv, ucs4_t *pwc)
* returns to the initial state and stores the pending wide character, if any.
* Result is 1 (if a wide character was read) or 0 if none was pending.
*/
};
/* Return code if invalid input after a shift sequence of n bytes was read.
(xxx_mbtowc) */
#define RET_SHIFT_ILSEQ(n) (-1-2*(n))
/* Return code if invalid. (xxx_mbtowc) */
#define RET_ILSEQ RET_SHIFT_ILSEQ(0)
/* Return code if only a shift sequence of n bytes was read. (xxx_mbtowc) */
#define RET_TOOFEW(n) (-2-2*(n))
/* Retrieve the n from the encoded RET_... value. */
#define DECODE_SHIFT_ILSEQ(r) ((unsigned int)(RET_SHIFT_ILSEQ(0) - (r)) / 2)
#define DECODE_TOOFEW(r) ((unsigned int)(RET_TOOFEW(0) - (r)) / 2)
/* Maximum value of n that may be used as argument to RET_SHIFT_ILSEQ or RET_TOOFEW. */
#define RET_COUNT_MAX ((INT_MAX / 2) - 1)
/*
* Data type for conversion unicode -> multibyte
*/
struct wctomb_funcs {
int (*xxx_wctomb) (conv_t conv, unsigned char *r, ucs4_t wc, size_t n);
/*
* int xxx_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
* converts the wide character wc to the character set xxx, and stores the
* result beginning at r. Up to n bytes may be written at r. n is >= 1.
* Result is number of bytes written, or -1 if invalid, or -2 if n too small.
*/
int (*xxx_reset) (conv_t conv, unsigned char *r, size_t n);
/*
* int xxx_reset (conv_t conv, unsigned char *r, size_t n)
* stores a shift sequences returning to the initial state beginning at r.
* Up to n bytes may be written at r. n is >= 0.
* Result is number of bytes written, or -2 if n too small.
*/
};
/* Return code if invalid. (xxx_wctomb) */
#define RET_ILUNI -1
/* Return code if output buffer is too small. (xxx_wctomb, xxx_reset) */
#define RET_TOOSMALL -2
/*
* Contents of a conversion descriptor.
*/
struct conv_struct {
struct loop_funcs lfuncs;
/* Input (conversion multibyte -> unicode) */
int iindex;
struct mbtowc_funcs ifuncs;
state_t istate;
/* Output (conversion unicode -> multibyte) */
int oindex;
struct wctomb_funcs ofuncs;
int oflags;
state_t ostate;
/* Operation flags */
int transliterate;
int discard_ilseq;
#ifndef LIBICONV_PLUG
struct iconv_fallbacks fallbacks;
struct iconv_hooks hooks;
#endif
};
/*
* Include all the converters.
*/
#include "ascii.h"
/* General multi-byte encodings */
#include "utf8.h"
#include "ucs2.h"
#include "ucs2be.h"
#include "ucs2le.h"
#include "ucs4.h"
#include "ucs4be.h"
#include "ucs4le.h"
#include "utf16.h"
#include "utf16be.h"
#include "utf16le.h"
#include "utf32.h"
#include "utf32be.h"
#include "utf32le.h"
#include "utf7.h"
#include "ucs2internal.h"
#include "ucs2swapped.h"
#include "ucs4internal.h"
#include "ucs4swapped.h"
#include "c99.h"
#include "java.h"
/* 8-bit encodings */
#include "iso8859_1.h"
#include "iso8859_2.h"
#include "iso8859_3.h"
#include "iso8859_4.h"
#include "iso8859_5.h"
#include "iso8859_6.h"
#include "iso8859_7.h"
#include "iso8859_8.h"
#include "iso8859_9.h"
#include "iso8859_10.h"
#include "iso8859_11.h"
#include "iso8859_13.h"
#include "iso8859_14.h"
#include "iso8859_15.h"
#include "iso8859_16.h"
#include "koi8_r.h"
#include "koi8_u.h"
#include "koi8_ru.h"
#include "cp1250.h"
#include "cp1251.h"
#include "cp1252.h"
#include "cp1253.h"
#include "cp1254.h"
#include "cp1255.h"
#include "cp1256.h"
#include "cp1257.h"
#include "cp1258.h"
#include "cp850.h"
#include "cp862.h"
#include "cp866.h"
#include "cp1131.h"
#include "mac_roman.h"
#include "mac_centraleurope.h"
#include "mac_iceland.h"
#include "mac_croatian.h"
#include "mac_romania.h"
#include "mac_cyrillic.h"
#include "mac_ukraine.h"
#include "mac_greek.h"
#include "mac_turkish.h"
#include "mac_hebrew.h"
#include "mac_arabic.h"
#include "mac_thai.h"
#include "hp_roman8.h"
#include "nextstep.h"
#include "armscii_8.h"
#include "georgian_academy.h"
#include "georgian_ps.h"
#include "koi8_t.h"
#include "pt154.h"
#include "rk1048.h"
#include "mulelao.h"
#include "cp1133.h"
#include "tis620.h"
#include "cp874.h"
#include "viscii.h"
#include "tcvn.h"
/* CJK character sets [CCS = coded character set] [CJKV.INF chapter 3] */
typedef struct {
unsigned short indx; /* index into big table */
unsigned short used; /* bitmask of used entries */
} Summary16;
#include "iso646_jp.h"
#include "jisx0201.h"
#include "jisx0208.h"
#include "jisx0212.h"
#include "iso646_cn.h"
#include "gb2312.h"
#include "isoir165.h"
/*#include "gb12345.h"*/
#include "gbk.h"
#include "cns11643.h"
#include "big5.h"
#include "ksc5601.h"
#include "johab_hangul.h"
/* CJK encodings [CES = character encoding scheme] [CJKV.INF chapter 4] */
#include "euc_jp.h"
#include "sjis.h"
#include "cp932.h"
#include "iso2022_jp.h"
#include "iso2022_jp1.h"
#include "iso2022_jp2.h"
#include "iso2022_jpms.h"
#include "euc_cn.h"
#include "ces_gbk.h"
#include "cp936.h"
#include "gb18030.h"
#include "iso2022_cn.h"
#include "iso2022_cnext.h"
#include "hz.h"
#include "euc_tw.h"
#include "ces_big5.h"
#include "cp950.h"
#include "big5hkscs1999.h"
#include "big5hkscs2001.h"
#include "big5hkscs2004.h"
#include "big5hkscs2008.h"
#include "euc_kr.h"
#include "cp949.h"
#include "johab.h"
#include "iso2022_kr.h"
/* Encodings used by system dependent locales. */
#ifdef USE_AIX
#include "cp856.h"
#include "cp922.h"
#include "cp943.h"
#include "cp1046.h"
#include "cp1124.h"
#include "cp1129.h"
#include "cp1161.h"
#include "cp1162.h"
#include "cp1163.h"
#endif
#ifdef USE_OSF1
#include "dec_kanji.h"
#include "dec_hanyu.h"
#endif
#ifdef USE_DOS
#include "cp437.h"
#include "cp737.h"
#include "cp775.h"
#include "cp852.h"
#include "cp853.h"
#include "cp855.h"
#include "cp857.h"
#include "cp858.h"
#include "cp860.h"
#include "cp861.h"
#include "cp863.h"
#include "cp864.h"
#include "cp865.h"
#include "cp869.h"
#include "cp1125.h"
#endif
#ifdef USE_EXTRA
#include "euc_jisx0213.h"
#include "shift_jisx0213.h"
#include "iso2022_jp3.h"
#include "big5_2003.h"
#include "tds565.h"
#include "atarist.h"
#include "riscos1.h"
#endif
/*
* Copyright (C) 1999-2001, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* CP1046
*/
static const unsigned short cp1046_2uni[128] = {
/* 0x80 */
0xfe88, 0x00d7, 0x00f7, 0xf8f6, 0xf8f5, 0xf8f4, 0xf8f7, 0xfe71,
0x0088, 0x25a0, 0x2502, 0x2500, 0x2510, 0x250c, 0x2514, 0x2518,
/* 0x90 */
0xfe79, 0xfe7b, 0xfe7d, 0xfe7f, 0xfe77, 0xfe8a, 0xfef0, 0xfef3,
0xfef2, 0xfece, 0xfecf, 0xfed0, 0xfef6, 0xfef8, 0xfefa, 0xfefc,
/* 0xa0 */
0x00a0, 0xf8fa, 0xf8f9, 0xf8f8, 0x00a4, 0xf8fb, 0xfe8b, 0xfe91,
0xfe97, 0xfe9b, 0xfe9f, 0xfea3, 0x060c, 0x00ad, 0xfea7, 0xfeb3,
/* 0xb0 */
0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667,
0x0668, 0x0669, 0xfeb7, 0x061b, 0xfebb, 0xfebf, 0xfeca, 0x061f,
/* 0xc0 */
0xfecb, 0x0621, 0x0622, 0x0623, 0x0624, 0x0625, 0x0626, 0x0627,
0x0628, 0x0629, 0x062a, 0x062b, 0x062c, 0x062d, 0x062e, 0x062f,
/* 0xd0 */
0x0630, 0x0631, 0x0632, 0x0633, 0x0634, 0x0635, 0x0636, 0x0637,
0xfec7, 0x0639, 0x063a, 0xfecc, 0xfe82, 0xfe84, 0xfe8e, 0xfed3,
/* 0xe0 */
0x0640, 0x0641, 0x0642, 0x0643, 0x0644, 0x0645, 0x0646, 0x0647,
0x0648, 0x0649, 0x064a, 0x064b, 0x064c, 0x064d, 0x064e, 0x064f,
/* 0xf0 */
0x0650, 0x0651, 0x0652, 0xfed7, 0xfedb, 0xfedf, 0xf8fc, 0xfef5,
0xfef7, 0xfef9, 0xfefb, 0xfee3, 0xfee7, 0xfeec, 0xfee9, 0xfffd,
};
static int
cp1046_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0x80) {
*pwc = (ucs4_t) c;
return 1;
}
else {
unsigned short wc = cp1046_2uni[c-0x80];
if (wc != 0xfffd) {
*pwc = (ucs4_t) wc;
return 1;
}
}
return RET_ILSEQ;
}
static const unsigned char cp1046_page00[112] = {
0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */
0xa0, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
0x00, 0x00, 0x00, 0x00, 0x00, 0xad, 0x00, 0x00, /* 0xa8-0xaf */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb8-0xbf */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc0-0xc7 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc8-0xcf */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, /* 0xd0-0xd7 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xd8-0xdf */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe0-0xe7 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xe8-0xef */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, /* 0xf0-0xf7 */
};
static const unsigned char cp1046_page06[104] = {
0x00, 0x00, 0x00, 0x00, 0xac, 0x00, 0x00, 0x00, /* 0x08-0x0f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
0x00, 0x00, 0x00, 0xbb, 0x00, 0x00, 0x00, 0xbf, /* 0x18-0x1f */
0x00, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, /* 0x20-0x27 */
0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, /* 0x28-0x2f */
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, /* 0x30-0x37 */
0x00, 0xd9, 0xda, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, /* 0x40-0x47 */
0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0x48-0x4f */
0xf0, 0xf1, 0xf2, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, /* 0x60-0x67 */
0xb8, 0xb9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
};
static const unsigned char cp1046_page25[32] = {
0x8b, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
0x00, 0x00, 0x00, 0x00, 0x8d, 0x00, 0x00, 0x00, /* 0x08-0x0f */
0x8c, 0x00, 0x00, 0x00, 0x8e, 0x00, 0x00, 0x00, /* 0x10-0x17 */
0x8f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
};
static const unsigned char cp1046_pagef8[16] = {
0x00, 0x00, 0x00, 0x00, 0x85, 0x84, 0x83, 0x86, /* 0xf0-0xf7 */
0xa3, 0xa2, 0xa1, 0xa5, 0xf6, 0x00, 0x00, 0x00, /* 0xf8-0xff */
};
static const unsigned char cp1046_pagefe[144] = {
0x00, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0x94, /* 0x70-0x77 */
0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00, 0x93, /* 0x78-0x7f */
0x00, 0x00, 0xdc, 0x00, 0xdd, 0x00, 0x00, 0x00, /* 0x80-0x87 */
0x80, 0x00, 0x95, 0xa6, 0x00, 0x00, 0xde, 0x00, /* 0x88-0x8f */
0x00, 0xa7, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, /* 0x90-0x97 */
0x00, 0x00, 0x00, 0xa9, 0x00, 0x00, 0x00, 0xaa, /* 0x98-0x9f */
0x00, 0x00, 0x00, 0xab, 0x00, 0x00, 0x00, 0xae, /* 0xa0-0xa7 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
0x00, 0x00, 0x00, 0xaf, 0x00, 0x00, 0x00, 0xba, /* 0xb0-0xb7 */
0x00, 0x00, 0x00, 0xbc, 0x00, 0x00, 0x00, 0xbd, /* 0xb8-0xbf */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, /* 0xc0-0xc7 */
0x00, 0x00, 0xbe, 0xc0, 0xdb, 0x00, 0x99, 0x9a, /* 0xc8-0xcf */
0x9b, 0x00, 0x00, 0xdf, 0x00, 0x00, 0x00, 0xf3, /* 0xd0-0xd7 */
0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0xf5, /* 0xd8-0xdf */
0x00, 0x00, 0x00, 0xfb, 0x00, 0x00, 0x00, 0xfc, /* 0xe0-0xe7 */
0x00, 0xfe, 0x00, 0x00, 0xfd, 0x00, 0x00, 0x00, /* 0xe8-0xef */
0x96, 0x00, 0x98, 0x97, 0x00, 0xf7, 0x9c, 0xf8, /* 0xf0-0xf7 */
0x9d, 0xf9, 0x9e, 0xfa, 0x9f, 0x00, 0x00, 0x00, /* 0xf8-0xff */
};
static int
cp1046_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char c = 0;
if (wc < 0x0080) {
*r = wc;
return 1;
}
else if (wc >= 0x0088 && wc < 0x00f8)
c = cp1046_page00[wc-0x0088];
else if (wc >= 0x0608 && wc < 0x0670)
c = cp1046_page06[wc-0x0608];
else if (wc >= 0x2500 && wc < 0x2520)
c = cp1046_page25[wc-0x2500];
else if (wc == 0x25a0)
c = 0x89;
else if (wc >= 0xf8f0 && wc < 0xf900)
c = cp1046_pagef8[wc-0xf8f0];
else if (wc >= 0xfe70 && wc < 0xff00)
c = cp1046_pagefe[wc-0xfe70];
if (c != 0) {
*r = c;
return 1;
}
return RET_ILUNI;
}
/*
* Copyright (C) 1999-2001, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* CP1124
*/
static const unsigned short cp1124_2uni[96] = {
/* 0xa0 */
0x00a0, 0x0401, 0x0402, 0x0490, 0x0404, 0x0405, 0x0406, 0x0407,
0x0408, 0x0409, 0x040a, 0x040b, 0x040c, 0x00ad, 0x040e, 0x040f,
/* 0xb0 */
0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f,
/* 0xc0 */
0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f,
/* 0xd0 */
0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f,
/* 0xe0 */
0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f,
/* 0xf0 */
0x2116, 0x0451, 0x0452, 0x0491, 0x0454, 0x0455, 0x0456, 0x0457,
0x0458, 0x0459, 0x045a, 0x045b, 0x045c, 0x00a7, 0x045e, 0x045f,
};
static int
cp1124_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0xa0)
*pwc = (ucs4_t) c;
else
*pwc = (ucs4_t) cp1124_2uni[c-0xa0];
return 1;
}
static const unsigned char cp1124_page00[16] = {
0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfd, /* 0xa0-0xa7 */
0x00, 0x00, 0x00, 0x00, 0x00, 0xad, 0x00, 0x00, /* 0xa8-0xaf */
};
static const unsigned char cp1124_page04[152] = {
0x00, 0xa1, 0xa2, 0x00, 0xa4, 0xa5, 0xa6, 0xa7, /* 0x00-0x07 */
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0x00, 0xae, 0xaf, /* 0x08-0x0f */
0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, /* 0x10-0x17 */
0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, /* 0x18-0x1f */
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, /* 0x20-0x27 */
0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, /* 0x28-0x2f */
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, /* 0x30-0x37 */
0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, /* 0x38-0x3f */
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, /* 0x40-0x47 */
0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0x48-0x4f */
0x00, 0xf1, 0xf2, 0x00, 0xf4, 0xf5, 0xf6, 0xf7, /* 0x50-0x57 */
0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x00, 0xfe, 0xff, /* 0x58-0x5f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
0xa3, 0xf3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
};
static int
cp1124_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char c = 0;
if (wc < 0x00a0) {
*r = wc;
return 1;
}
else if (wc >= 0x00a0 && wc < 0x00b0)
c = cp1124_page00[wc-0x00a0];
else if (wc >= 0x0400 && wc < 0x0498)
c = cp1124_page04[wc-0x0400];
else if (wc == 0x2116)
c = 0xf0;
if (c != 0) {
*r = c;
return 1;
}
return RET_ILUNI;
}
/*
* Copyright (C) 1999-2001, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* CP1125
*/
static const unsigned short cp1125_2uni[80] = {
/* 0xb0 */
0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556,
0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510,
/* 0xc0 */
0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f,
0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567,
/* 0xd0 */
0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b,
0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580,
/* 0xe0 */
0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f,
/* 0xf0 */
0x0401, 0x0451, 0x0490, 0x0491, 0x0404, 0x0454, 0x0406, 0x0456,
0x0407, 0x0457, 0x00b7, 0x221a, 0x2116, 0x00a4, 0x25a0, 0x00a0,
};
static int
cp1125_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0x80)
*pwc = (ucs4_t) c;
else if (c < 0xb0)
*pwc = (ucs4_t) c + 0x0390;
else
*pwc = (ucs4_t) cp1125_2uni[c-0xb0];
return 1;
}
static const unsigned char cp1125_page00[24] = {
0xff, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, /* 0xb0-0xb7 */
};
static const unsigned char cp1125_page04[152] = {
0x00, 0xf0, 0x00, 0x00, 0xf4, 0x00, 0xf6, 0xf8, /* 0x00-0x07 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, /* 0x10-0x17 */
0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, /* 0x18-0x1f */
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, /* 0x20-0x27 */
0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, /* 0x28-0x2f */
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, /* 0x30-0x37 */
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, /* 0x38-0x3f */
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, /* 0x40-0x47 */
0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0x48-0x4f */
0x00, 0xf1, 0x00, 0x00, 0xf5, 0x00, 0xf7, 0xf9, /* 0x50-0x57 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
0xf2, 0xf3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
};
static const unsigned char cp1125_page25[168] = {
0xc4, 0x00, 0xb3, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
0x00, 0x00, 0x00, 0x00, 0xda, 0x00, 0x00, 0x00, /* 0x08-0x0f */
0xbf, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, /* 0x10-0x17 */
0xd9, 0x00, 0x00, 0x00, 0xc3, 0x00, 0x00, 0x00, /* 0x18-0x1f */
0x00, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, /* 0x20-0x27 */
0x00, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, /* 0x28-0x2f */
0x00, 0x00, 0x00, 0x00, 0xc1, 0x00, 0x00, 0x00, /* 0x30-0x37 */
0x00, 0x00, 0x00, 0x00, 0xc5, 0x00, 0x00, 0x00, /* 0x38-0x3f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
0xcd, 0xba, 0xd5, 0xd6, 0xc9, 0xb8, 0xb7, 0xbb, /* 0x50-0x57 */
0xd4, 0xd3, 0xc8, 0xbe, 0xbd, 0xbc, 0xc6, 0xc7, /* 0x58-0x5f */
0xcc, 0xb5, 0xb6, 0xb9, 0xd1, 0xd2, 0xcb, 0xcf, /* 0x60-0x67 */
0xd0, 0xca, 0xd8, 0xd7, 0xce, 0x00, 0x00, 0x00, /* 0x68-0x6f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
0xdf, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00, /* 0x80-0x87 */
0xdb, 0x00, 0x00, 0x00, 0xdd, 0x00, 0x00, 0x00, /* 0x88-0x8f */
0xde, 0xb0, 0xb1, 0xb2, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */
0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
};
static int
cp1125_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char c = 0;
if (wc < 0x0080) {
*r = wc;
return 1;
}
else if (wc >= 0x00a0 && wc < 0x00b8)
c = cp1125_page00[wc-0x00a0];
else if (wc >= 0x0400 && wc < 0x0498)
c = cp1125_page04[wc-0x0400];
else if (wc == 0x2116)
c = 0xfc;
else if (wc == 0x221a)
c = 0xfb;
else if (wc >= 0x2500 && wc < 0x25a8)
c = cp1125_page25[wc-0x2500];
if (c != 0) {
*r = c;
return 1;
}
return RET_ILUNI;
}
/*
* Copyright (C) 1999-2001, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* CP1129
*/
static const unsigned short cp1129_2uni[96] = {
/* 0xa0 */
0x00a0, 0x00a1, 0x00a2, 0x00a3, 0x00a4, 0x00a5, 0x00a6, 0x00a7,
0x0153, 0x00a9, 0x00aa, 0x00ab, 0x00ac, 0x00ad, 0x00ae, 0x00af,
/* 0xb0 */
0x00b0, 0x00b1, 0x00b2, 0x00b3, 0x0178, 0x00b5, 0x00b6, 0x00b7,
0x0152, 0x00b9, 0x00ba, 0x00bb, 0x00bc, 0x00bd, 0x00be, 0x00bf,
/* 0xc0 */
0x00c0, 0x00c1, 0x00c2, 0x0102, 0x00c4, 0x00c5, 0x00c6, 0x00c7,
0x00c8, 0x00c9, 0x00ca, 0x00cb, 0x0300, 0x00cd, 0x00ce, 0x00cf,
/* 0xd0 */
0x0110, 0x00d1, 0x0309, 0x00d3, 0x00d4, 0x01a0, 0x00d6, 0x00d7,
0x00d8, 0x00d9, 0x00da, 0x00db, 0x00dc, 0x01af, 0x0303, 0x00df,
/* 0xe0 */
0x00e0, 0x00e1, 0x00e2, 0x0103, 0x00e4, 0x00e5, 0x00e6, 0x00e7,
0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x0301, 0x00ed, 0x00ee, 0x00ef,
/* 0xf0 */
0x0111, 0x00f1, 0x0323, 0x00f3, 0x00f4, 0x01a1, 0x00f6, 0x00f7,
0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x01b0, 0x20ab, 0x00ff,
};
static int
cp1129_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0xa0)
*pwc = (ucs4_t) c;
else
*pwc = (ucs4_t) cp1129_2uni[c-0xa0];
return 1;
}
static const unsigned char cp1129_page00[272] = {
0x00, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, /* 0xa8-0xaf */
0xb0, 0xb1, 0xb2, 0xb3, 0x00, 0xb5, 0xb6, 0xb7, /* 0xb0-0xb7 */
0x00, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, /* 0xb8-0xbf */
0xc0, 0xc1, 0xc2, 0x00, 0xc4, 0xc5, 0xc6, 0xc7, /* 0xc0-0xc7 */
0xc8, 0xc9, 0xca, 0xcb, 0x00, 0xcd, 0xce, 0xcf, /* 0xc8-0xcf */
0x00, 0xd1, 0x00, 0xd3, 0xd4, 0x00, 0xd6, 0xd7, /* 0xd0-0xd7 */
0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0x00, 0x00, 0xdf, /* 0xd8-0xdf */
0xe0, 0xe1, 0xe2, 0x00, 0xe4, 0xe5, 0xe6, 0xe7, /* 0xe0-0xe7 */
0xe8, 0xe9, 0xea, 0xeb, 0x00, 0xed, 0xee, 0xef, /* 0xe8-0xef */
0x00, 0xf1, 0x00, 0xf3, 0xf4, 0x00, 0xf6, 0xf7, /* 0xf0-0xf7 */
0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0x00, 0x00, 0xff, /* 0xf8-0xff */
/* 0x0100 */
0x00, 0x00, 0xc3, 0xe3, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */
0xd0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x28-0x2f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30-0x37 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x38-0x3f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
0x00, 0x00, 0xb8, 0xa8, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
0xb4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */
0xd5, 0xf5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdd, /* 0xa8-0xaf */
0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xb0-0xb7 */
};
static const unsigned char cp1129_page03[40] = {
0xcc, 0xec, 0x00, 0xde, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
0x00, 0xd2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10-0x17 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18-0x1f */
0x00, 0x00, 0x00, 0xf2, 0x00, 0x00, 0x00, 0x00, /* 0x20-0x27 */
};
static int
cp1129_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char c = 0;
if (wc < 0x00a8) {
*r = wc;
return 1;
}
else if (wc >= 0x00a8 && wc < 0x01b8)
c = cp1129_page00[wc-0x00a8];
else if (wc >= 0x0300 && wc < 0x0328)
c = cp1129_page03[wc-0x0300];
else if (wc == 0x20ab)
c = 0xfe;
if (c != 0) {
*r = c;
return 1;
}
return RET_ILUNI;
}
/*
* Copyright (C) 1999-2002, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* CP1131
*/
static const unsigned short cp1131_2uni[128] = {
/* 0x80 */
0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417,
0x0418, 0x0419, 0x041a, 0x041b, 0x041c, 0x041d, 0x041e, 0x041f,
/* 0x90 */
0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427,
0x0428, 0x0429, 0x042a, 0x042b, 0x042c, 0x042d, 0x042e, 0x042f,
/* 0xa0 */
0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437,
0x0438, 0x0439, 0x043a, 0x043b, 0x043c, 0x043d, 0x043e, 0x043f,
/* 0xb0 */
0x2591, 0x2592, 0x2593, 0x2502, 0x2524, 0x2561, 0x2562, 0x2556,
0x2555, 0x2563, 0x2551, 0x2557, 0x255d, 0x255c, 0x255b, 0x2510,
/* 0xc0 */
0x2514, 0x2534, 0x252c, 0x251c, 0x2500, 0x253c, 0x255e, 0x255f,
0x255a, 0x2554, 0x2569, 0x2566, 0x2560, 0x2550, 0x256c, 0x2567,
/* 0xd0 */
0x2568, 0x2564, 0x2565, 0x2559, 0x2558, 0x2552, 0x2553, 0x256b,
0x256a, 0x2518, 0x250c, 0x2588, 0x2584, 0x258c, 0x2590, 0x2580,
/* 0xe0 */
0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447,
0x0448, 0x0449, 0x044a, 0x044b, 0x044c, 0x044d, 0x044e, 0x044f,
/* 0xf0 */
0x0401, 0x0451, 0x0404, 0x0454, 0x0407, 0x0457, 0x040e, 0x045e,
0x0406, 0x0456, 0x00b7, 0x00a4, 0x0490, 0x0491, 0x2219, 0x00a0,
};
static int
cp1131_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0x80)
*pwc = (ucs4_t) c;
else
*pwc = (ucs4_t) cp1131_2uni[c-0x80];
return 1;
}
static const unsigned char cp1131_page00[24] = {
0xff, 0x00, 0x00, 0x00, 0xfb, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfa, /* 0xb0-0xb7 */
};
static const unsigned char cp1131_page04[152] = {
0x00, 0xf0, 0x00, 0x00, 0xf2, 0x00, 0xf8, 0xf4, /* 0x00-0x07 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x00, /* 0x08-0x0f */
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, /* 0x10-0x17 */
0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, /* 0x18-0x1f */
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, /* 0x20-0x27 */
0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, /* 0x28-0x2f */
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, /* 0x30-0x37 */
0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, /* 0x38-0x3f */
0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, /* 0x40-0x47 */
0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, /* 0x48-0x4f */
0x00, 0xf1, 0x00, 0x00, 0xf3, 0x00, 0xf9, 0xf5, /* 0x50-0x57 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf7, 0x00, /* 0x58-0x5f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */
0xfc, 0xfd, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
};
static const unsigned char cp1131_page25[152] = {
0xc4, 0x00, 0xb3, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */
0x00, 0x00, 0x00, 0x00, 0xda, 0x00, 0x00, 0x00, /* 0x08-0x0f */
0xbf, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, /* 0x10-0x17 */
0xd9, 0x00, 0x00, 0x00, 0xc3, 0x00, 0x00, 0x00, /* 0x18-0x1f */
0x00, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, /* 0x20-0x27 */
0x00, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, /* 0x28-0x2f */
0x00, 0x00, 0x00, 0x00, 0xc1, 0x00, 0x00, 0x00, /* 0x30-0x37 */
0x00, 0x00, 0x00, 0x00, 0xc5, 0x00, 0x00, 0x00, /* 0x38-0x3f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x40-0x47 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x48-0x4f */
0xcd, 0xba, 0xd5, 0xd6, 0xc9, 0xb8, 0xb7, 0xbb, /* 0x50-0x57 */
0xd4, 0xd3, 0xc8, 0xbe, 0xbd, 0xbc, 0xc6, 0xc7, /* 0x58-0x5f */
0xcc, 0xb5, 0xb6, 0xb9, 0xd1, 0xd2, 0xcb, 0xcf, /* 0x60-0x67 */
0xd0, 0xca, 0xd8, 0xd7, 0xce, 0x00, 0x00, 0x00, /* 0x68-0x6f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x78-0x7f */
0xdf, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00, /* 0x80-0x87 */
0xdb, 0x00, 0x00, 0x00, 0xdd, 0x00, 0x00, 0x00, /* 0x88-0x8f */
0xde, 0xb0, 0xb1, 0xb2, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */
};
static int
cp1131_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char c = 0;
if (wc < 0x0080) {
*r = wc;
return 1;
}
else if (wc >= 0x00a0 && wc < 0x00b8)
c = cp1131_page00[wc-0x00a0];
else if (wc >= 0x0400 && wc < 0x0498)
c = cp1131_page04[wc-0x0400];
else if (wc == 0x2219)
c = 0xfe;
else if (wc >= 0x2500 && wc < 0x2598)
c = cp1131_page25[wc-0x2500];
if (c != 0) {
*r = c;
return 1;
}
return RET_ILUNI;
}
/*
* Copyright (C) 1999-2001, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* IBM-CP1133
*/
static const unsigned short cp1133_2uni_1[64] = {
/* 0xa0 */
0x00a0, 0x0e81, 0x0e82, 0x0e84, 0x0e87, 0x0e88, 0x0eaa, 0x0e8a,
0x0e8d, 0x0e94, 0x0e95, 0x0e96, 0x0e97, 0x0e99, 0x0e9a, 0x0e9b,
/* 0xb0 */
0x0e9c, 0x0e9d, 0x0e9e, 0x0e9f, 0x0ea1, 0x0ea2, 0x0ea3, 0x0ea5,
0x0ea7, 0x0eab, 0x0ead, 0x0eae, 0xfffd, 0xfffd, 0xfffd, 0x0eaf,
/* 0xc0 */
0x0eb0, 0x0eb2, 0x0eb3, 0x0eb4, 0x0eb5, 0x0eb6, 0x0eb7, 0x0eb8,
0x0eb9, 0x0ebc, 0x0eb1, 0x0ebb, 0x0ebd, 0xfffd, 0xfffd, 0xfffd,
/* 0xd0 */
0x0ec0, 0x0ec1, 0x0ec2, 0x0ec3, 0x0ec4, 0x0ec8, 0x0ec9, 0x0eca,
0x0ecb, 0x0ecc, 0x0ecd, 0x0ec6, 0xfffd, 0x0edc, 0x0edd, 0x20ad,
};
static const unsigned short cp1133_2uni_2[16] = {
/* 0xf0 */
0x0ed0, 0x0ed1, 0x0ed2, 0x0ed3, 0x0ed4, 0x0ed5, 0x0ed6, 0x0ed7,
0x0ed8, 0x0ed9, 0xfffd, 0xfffd, 0x00a2, 0x00ac, 0x00a6, 0xfffd,
};
static int
cp1133_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0xa0) {
*pwc = (ucs4_t) c;
return 1;
}
else if (c < 0xe0) {
unsigned short wc = cp1133_2uni_1[c-0xa0];
if (wc != 0xfffd) {
*pwc = (ucs4_t) wc;
return 1;
}
}
else if (c < 0xf0) {
}
else {
unsigned short wc = cp1133_2uni_2[c-0xf0];
if (wc != 0xfffd) {
*pwc = (ucs4_t) wc;
return 1;
}
}
return RET_ILSEQ;
}
static const unsigned char cp1133_page00[16] = {
0xa0, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfe, 0x00, /* 0xa0-0xa7 */
0x00, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
};
static const unsigned char cp1133_page0e[96] = {
0x00, 0xa1, 0xa2, 0x00, 0xa3, 0x00, 0x00, 0xa4, /* 0x80-0x87 */
0xa5, 0x00, 0xa7, 0x00, 0x00, 0xa8, 0x00, 0x00, /* 0x88-0x8f */
0x00, 0x00, 0x00, 0x00, 0xa9, 0xaa, 0xab, 0xac, /* 0x90-0x97 */
0x00, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, /* 0x98-0x9f */
0x00, 0xb4, 0xb5, 0xb6, 0x00, 0xb7, 0x00, 0xb8, /* 0xa0-0xa7 */
0x00, 0x00, 0xa6, 0xb9, 0x00, 0xba, 0xbb, 0xbf, /* 0xa8-0xaf */
0xc0, 0xca, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, /* 0xb0-0xb7 */
0xc7, 0xc8, 0x00, 0xcb, 0xc9, 0xcc, 0x00, 0x00, /* 0xb8-0xbf */
0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0x00, 0xdb, 0x00, /* 0xc0-0xc7 */
0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0x00, 0x00, /* 0xc8-0xcf */
0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, /* 0xd0-0xd7 */
0xf8, 0xf9, 0x00, 0x00, 0xdd, 0xde, 0x00, 0x00, /* 0xd8-0xdf */
};
static int
cp1133_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char c = 0;
if (wc < 0x00a0) {
*r = wc;
return 1;
}
else if (wc >= 0x00a0 && wc < 0x00b0)
c = cp1133_page00[wc-0x00a0];
else if (wc >= 0x0e80 && wc < 0x0ee0)
c = cp1133_page0e[wc-0x0e80];
else if (wc == 0x20ad)
c = 0xdf;
if (c != 0) {
*r = c;
return 1;
}
return RET_ILUNI;
}
/*
* Copyright (C) 1999-2002, 2016 Free Software Foundation, Inc.
* This file is part of the GNU LIBICONV Library.
*
* The GNU LIBICONV Library is free software; you can redistribute it
* and/or modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* The GNU LIBICONV Library is distributed in the hope that it will be
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with the GNU LIBICONV Library; see the file COPYING.LIB.
* If not, see <http://www.gnu.org/licenses/>.
*/
/*
* CP1161
*/
static const unsigned short cp1161_2uni[96] = {
/* 0xa0 */
0x0e48, 0x0e01, 0x0e02, 0x0e03, 0x0e04, 0x0e05, 0x0e06, 0x0e07,
0x0e08, 0x0e09, 0x0e0a, 0x0e0b, 0x0e0c, 0x0e0d, 0x0e0e, 0x0e0f,
/* 0xb0 */
0x0e10, 0x0e11, 0x0e12, 0x0e13, 0x0e14, 0x0e15, 0x0e16, 0x0e17,
0x0e18, 0x0e19, 0x0e1a, 0x0e1b, 0x0e1c, 0x0e1d, 0x0e1e, 0x0e1f,
/* 0xc0 */
0x0e20, 0x0e21, 0x0e22, 0x0e23, 0x0e24, 0x0e25, 0x0e26, 0x0e27,
0x0e28, 0x0e29, 0x0e2a, 0x0e2b, 0x0e2c, 0x0e2d, 0x0e2e, 0x0e2f,
/* 0xd0 */
0x0e30, 0x0e31, 0x0e32, 0x0e33, 0x0e34, 0x0e35, 0x0e36, 0x0e37,
0x0e38, 0x0e39, 0x0e3a, 0x0e49, 0x0e4a, 0x0e4b, 0x20ac, 0x0e3f,
/* 0xe0 */
0x0e40, 0x0e41, 0x0e42, 0x0e43, 0x0e44, 0x0e45, 0x0e46, 0x0e47,
0x0e48, 0x0e49, 0x0e4a, 0x0e4b, 0x0e4c, 0x0e4d, 0x0e4e, 0x0e4f,
/* 0xf0 */
0x0e50, 0x0e51, 0x0e52, 0x0e53, 0x0e54, 0x0e55, 0x0e56, 0x0e57,
0x0e58, 0x0e59, 0x0e5a, 0x0e5b, 0x00a2, 0x00ac, 0x00a6, 0x00a0,
};
static int
cp1161_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, size_t n)
{
unsigned char c = *s;
if (c < 0x80) {
*pwc = (ucs4_t) c;
return 1;
}
else if (c < 0xa0) {
}
else {
*pwc = (ucs4_t) cp1161_2uni[c-0xa0];
return 1;
}
return RET_ILSEQ;
}
static const unsigned char cp1161_page00[16] = {
0xff, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfe, 0x00, /* 0xa0-0xa7 */
0x00, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x00, 0x00, /* 0xa8-0xaf */
};
static int
cp1161_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, size_t n)
{
unsigned char c = 0;
if (wc < 0x0080) {
*r = wc;
return 1;
}
else if (wc >= 0x00a0 && wc < 0x00b0)
c = cp1161_page00[wc-0x00a0];
else if (wc >= 0x0e48 && wc < 0x0e4c)
c = wc-0x0d60;
else if (wc >= 0x0e00 && wc < 0x0e60)
c = cp874_page0e[wc-0x0e00];
else if (wc == 0x20ac)
c = 0xde;
if (c != 0) {
*r = c;
return 1;
}
return RET_ILUNI;
}
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.