이태화

디자인 전면 수정

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