PageSourceSearch

https://www.ftu.org.hk/_nuxt/fG46_id4.js

js ftu.org.hk collected 2026-10-02 17:37:38 UTC 18,389 bytes, 1 lines download raw bytes

1import{d as Le,i as m,g as Ae,f as Ce,c as v,a4 as Oe,u as Ie,cA as Se,k as Me,l as d,o as r,y as p,p as g,e as a,m as s,t as f,n as Ne,F as q,x as L,at as Ee,q as w,a0 as V,X as Ve,G as C,Z as X,J as De,Q as Be,bE as Ue,w as D,v as B,s as Z,b as ee,E as je,K as Fe,N as $e,Y as Pe,C as te,B as Qe,_ as Re}from"./rNMPrltl.js";/* empty css        *//* empty css        *//* empty css        *//* empty css        *//* empty css        *//* empty css        *//* empty css        *//* empty css        *//* empty css        *//* empty css        */import{_ as ze}from"./BlRCviZe.js";import{_ as Je}from"./Sx36IoYa.js";import{_ as We}from"./k0mqEJZo.js";import{y as se,n as oe,m as Ye,a as Ge}from"./B1lQSrPx.js";import{_ as He}from"./Cbaw252L.js";import{r as Ke,g as U,s as Xe}from"./x_zPib0z.js";import{f as Ze}from"./uvhtZEID.js";import{u as et}from"./boj7xwiX.js";import{h as tt,s as st}from"./Rt4uIBY8.js";import{s as ot}from"./Ck5V90QN.js";import"./DuNvpYXI.js";import"./DwZmDrvN.js";import"./CXXDZoq4.js";const nt={class:"relative lt-md:px-0.625rem lt-sm:px-0.625rem lt-xl:px-0.625rem lt-xl:px-0.625rem",style:{"background-color":"#fff",position:"relative"}},it={key:0,class:"h-80rem flex justify-between"},lt={style:{width:"calc(100% - 10rem)"},class:"pl-8.75rem pr-8.75rem mt-2.1875rem"},rt={class:"flex justify-between items-start"},at={class:"flex flex-row"},ct={class:"mb-0.625rem"},dt={class:"question-title"},ut={class:"question-title-second"},pt={class:"question-detail-actions"},ft=["src"],ht=["src"],mt={key:0,class:"mt-3.125rem flex justify-center w-100% h-3.125rem items-center shadow-card mb-2%",style:{border:"0.0625rem solid #ededed","border-radius":"0.5rem"}},yt={class:"top-text-two"},wt={class:"top-text-two"},_t={class:"top-text-two"},xt={class:"top-text-two"},vt={key:0},gt={class:"top-text-three"},bt={class:"w-100% h-45rem big-img",style:{overflow:"auto","border-radius":"7px"}},kt={key:0,class:"w-70% float-right mr-4% mt-4% h-40rem pl-1.25rem",style:{"overflow-y":"auto","background-color":"#ffffff","border-radius":"4px"}},Tt={class:"sticky-header"},qt={class:"top-test w-100% h-3.8125rem flex justify-between items-center"},Lt={class:"big-number"},At={class:"smell-number"},Ct=["disabled"],Ot={class:"w-100% flex items-center justify-between mb-1rem"},It={class:"progress-container"},St={class:"question-scroll-container"},Mt={class:"question-content flex flex-col flex-wrap"},Nt={class:"flex mb-0.9375rem"},Et={key:0,style:{color:"red"}},Vt={class:"pr-12px"},Dt={class:"flex gap-2.5rem items-start flex-wrap pb-25px",style:{"border-bottom":"1px solid #ededed","margin-bottom":"35px"}},Bt={key:0,class:"relative flex-shrink-0"},Ut=["src"],jt={class:"flex-1"},Ft={key:0,class:"flex alone-radio justify-between"},$t=["onUpdate:modelValue"],Pt={key:1,class:"flex flex-wrap gap-15px alone-radio"},Qt=["onClick"],Rt={key:0,src:se,alt:"",class:"h-1rem w-1rem"},zt={key:1,src:oe,alt:"",class:"h-1rem w-1rem"},Jt={class:"alone-radio-two"},Wt={class:"alone-radio-two",style:{flex:"1"}},Yt=["onUpdate:modelValue","onInput"],Gt={key:2,class:"flex flex-wrap flex-start gap-15px alone-radio"},Ht=["onClick"],Kt={key:0,src:Ye,alt:"",class:"h-1rem w-1rem"},Xt={key:1,src:Ge,alt:"",class:"h-1rem w-1rem"},Zt={class:"alone-radio-two"},es={class:"alone-radio-two"},ts=["onUpdate:modelValue","onInput"],ss={key:3,class:"flex"},os={key:4,class:"flex justify-between"},ns={class:"alone-radio-two"},is={key:0,class:"flex flex-row gap-15"},ls=["onClick"],rs={key:0,src:se,alt:"",class:"h-1rem w-1rem"},as={key:1,src:oe,alt:"",class:"h-1rem w-1rem"},cs={class:"alone-radio-two"},ds={key:1,class:"w-70% float-right mr-4% mt-4% h-40rem pl-1.25rem pr-1.25rem flex flex-col items-center pt-8%",style:{"overflow-y":"auto","background-color":"#ffffff"}},us={class:"pls-select"},ps={class:"flex justify-center mb-40px"},fs=Le({name:"QuestionDetail",__name:"detailPc",setup(hs){const{isTradChin:j}=et();m(0);const h=Oe(),_=Ee(),A=Ae(),{t:ms}=Ce();v(()=>A.accessToken||"");const k=m(!1),c=m({}),F=m(!1),O=m(!1),ne=m({}),I=m(""),$=m(h.query.isPreview||"0"),T=m(!1),M=m([]),b=m(""),{wsCache:ie}=De(),S=m(!1),le=async()=>{var u,y;const t=(u=c.value)==null?void 0:u.id,e=(y=A.userInfo)==null?void 0:y.id;if(!t)return;if(!e){C.warning("請先登錄");return}const n=!S.value;await Ke({userId:String(e),infoId:String(t),status:n?"favorite":"cancel"})&&(S.value=n,C.success(n?"收藏成功":"已取消收藏"))},re=async()=>{try{const t=window.location.href;if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(t);else{const e=document.createElement("textarea");if(e.value=t,e.style.position="fixed",e.style.left="-999999px",e.style.top="-999999px",document.body.appendChild(e),e.focus(),e.select(),!document.execCommand("copy"))throw new Error("copy failed");document.body.removeChild(e)}C.success("複製成功")}catch(t){console.error("問卷分享失敗:",t),C.error("複製失敗")}},ae=()=>{h.query.from==="home"?_.push("/"):_.push("/question")};m("");const ce=m(""),de=m(""),P=v(()=>{var t,e;return((e=(t=c.value)==null?void 0:t.researchMasterQuestions)==null?void 0:e.filter(n=>n.userAnswer&&n.userAnswer.trim()!==""&&n.questionType!=1).length)||0}),Q=v(()=>{var t;return(t=c.value)!=null&&t.researchMasterQuestions?c.value.researchMasterQuestions.filter(e=>e.questionType!=1).length:0}),ue=v(()=>{var n;if(!((n=c.value)!=null&&n.researchMasterQuestions))return 0;const t=Q.value,e=P.value;return t>0?Math.round(e/t*100):0});
1Ie({title:v(()=>{var t;return j.value?`${(t=c.value)==null?void 0:t.questionnaireName} | 問卷中心 | 工聯會`:""}),meta:[{name:"description",content:v(()=>{var t;return j.value?(t=c.value)==null?void 0:t.questionnaireName:""})}]});const R=t=>{const e=Number(t.optionMin),n=Number(t.optionMax);if(!t.optionMax||Number.isNaN(e)||Number.isNaN(n)||n<e)return[];const o=[];for(let u=e;u<=n;u++)o.push(u);return o},z=t=>{const e=t.questionOptionList||[];return e.length>=2?{min:e[0].optionText,max:e[e.length-1].optionText}:t.optionMin!=null&&t.optionMin!==""&&t.optionMax!=null&&t.optionMax!==""?{min:String(t.optionMin),max:String(t.optionMax)}:{min:"",max:""}},pe=async(t,e)=>{e.selectedScore=t,e.userAnswer=t.toString(),console.log("[questionDetail][type6] selected:",{questionId:e.id,score:t,optionMin:e.optionMin,optionMax:e.optionMax,userAnswer:e.userAnswer}),e.questionOptionList&&e.questionOptionList.length>0?(e.optionIdList=e.questionOptionList.map(n=>n.id),e.optionList=e.optionIdList):e.optionList=[]},N=t=>{const e=new Date(t),n=String(e.getDate()).padStart(2,"0"),o=String(e.getMonth()+1).padStart(2,"0"),u=e.getFullYear();return`${n}-${o}-${u}`},fe=async()=>{const t=await Ze();(t==null||t==""||t.length==0)&&!await U({id:h.query.id,deptId:null,deptName:null,deptCode:null,isPreview:"0"})||(M.value=t,T.value=!0)},he=async()=>{if(!b.value){X.alert("請選擇单位","提示",{confirmButtonText:"確定",type:"warning"});return}let t={};M.value.forEach(n=>{n.id==b.value&&(t=n)}),await U({id:h.query.id,deptId:b.value||null,deptName:t.name||null,deptCode:t.deptcode||null,isPreview:"0"})&&(T.value=!1,_.push({path:"/questionDetail",query:{id:h.query.id,deptId:b.value,deptName:t.name,deptCode:t.deptcode,isPreview:"0"}}))},me=async()=>{var t;k.value=!1;try{const e=await U({id:h.query.id,deptId:h.query.deptId||null,deptName:h.query.deptName||null,deptCode:h.query.deptCode||null,isPreview:$.value});console.log("[questionDetail][getDetailByWeb] response:",e);const n=(t=e==null?void 0:e.researchMasterQuestions)==null?void 0:t.filter(o=>String(o.questionType)==="6");n!=null&&n.length&&console.log("[questionDetail][getDetailByWeb] type6 rating questions:",n),F.value=!0,c.value=e,S.value=String((e==null?void 0:e.isCollect)||"0")==="1",e.showType==1?(c.value=e,c.value.researchMasterQuestions.forEach(o=>{o.questionType==4&&(o.selectedOptions=[],o.otherAnswer=""),o.questionType==3&&(o.otherAnswer=""),String(o.questionType)==="6"&&(o.selectedScore=null),o.questionList&&o.questionList.forEach(u=>{u.questionType==="4"&&u.questionOptionList.forEach(y=>{y.checked=!1})})}),k.value=!0):e.showType==2&&setTimeout(()=>{O.value=!0,c.value=e,k.value=!0},500)}catch(e){e.includes("您必須登入才可參加該問卷")||X.alert("問卷不存在","提示",{confirmButtonText:"確定",type:"error"}).then(()=>{_.back()}).catch(()=>{_.back()})}finally{k.value=!0}},ye=async t=>{I.value=t,c.value.researchMasterQuestions.forEach(e=>{e.questionType=="5"&&e.questionOptionList.forEach(n=>{n.id==t&&(e.userAnswer=n.optionText,e.optionList=e.questionOptionList.map(o=>o.id))})})},E=(t,e)=>t.selectedOptions?t.selectedOptions.includes(e):!1,J=t=>{if(!t.selectedOptions)return!1;const e=t.questionOptionList.find(n=>n.optionText==="其他");return e&&t.selectedOptions.includes(e.id)},we=t=>{if(!t.selectedOptions)return;const e=[];t.questionOptionList.forEach(n=>{t.selectedOptions.includes(n.id)&&(n.optionText==="其他"?e.push(t.otherAnswer||""):e.push(n.optionText))}),t.userAnswer=e.join(","),t.optionList=t.selectedOptions},_e=async(t,e,n)=>{const o=c.value.researchMasterQuestions.find(x=>x.id===t&&x.questionType==4);if(!o)return;o.selectedOptions||(o.selectedOptions=[]);const u=o.selectedOptions.indexOf(e);u>-1?o.selectedOptions.splice(u,1):o.selectedOptions.push(e);const y=[];o.questionOptionList.forEach(x=>{o.selectedOptions.includes(x.id)&&(x.optionText==="其他"?y.push("其他"):y.push(x.optionText))}),o.userAnswer=y.join(","),o.optionList=o.selectedOptions};function xe(t){let e=!0;const n=t.filter(o=>o.isRequired==1&&o.questionType!=1);for(const o of n){if(o.questionType=="3"){if(W(o)){if(!o.otherAnswer||o.otherAnswer.trim()===""){e=!1;continue}o.userAnswer=o.otherAnswer}}else if(o.questionType=="4"&&J(o)){if(!o.otherAnswer||o.otherAnswer.trim()===""){e=!1;continue}o.userAnswer&&o.userAnswer.includes("其他")&&(o.userAnswer=o.userAnswer.replace("其他",o.otherAnswer))}(!o.userAnswer||o.userAnswer.trim()==="")&&(e=!1)}return e}const ve=async()=>{const t=JSON.parse(JSON.stringify(c.value.researchMasterQuestions));if(!xe(t)){C.error("请填写必填项");return}const n={infoId:h.query.id,deptId:h.query.deptId?h.query.deptId:null,deptName:h.query.deptName?h.query.deptName:null,deptCode:h.query.deptCode?h.query.deptCode:null,region:null,researchUserAnswerQuestionList:[{questionId:"1",userAnswer:"用户答案",optionList:["1","2","3"]}]};n.researchUserAnswerQuestionList=[],c.value.researchMasterQuestions.forEach(u=>{n.researchUserAnswerQuestionList.push({questionId:u.id,userAnswer:u.userAnswer,optionList:u.optionList||[]})});const o=await Xe(n);o&&(ne.value=o),O.value=!0},ge=async(t,e,n,o)=>{ce.value=n,de.value=e,c.value.researchMasterQuestions.forEach(u=>{u.questionType=="3"&&u.id==t&&(u.optionList=u.questionOptionList.map(y=>y.id),u.userAnswer=n,u.optionListTwo=[e])})},W=t=>{if(!t.optionListTwo)return!1;const e=t.questionOptionList.find(n=>n.optionText==="其他");return e&&t.optionListTwo.includes(e.id)},be=t=>{if(!t.optionListTwo)return;const e=t.questionOptionList.find(n=>
1t.optionListTwo.includes(n.id));e&&e.optionText==="其他"?t.userAnswer=t.otherAnswer||"":e&&(t.userAnswer=e.optionText)},Y=v(()=>{const t=!!Se(),e=A.isLoggedIn,n=!!A.userInfo;return console.log(t,e,n),!t&&e?(A.clearAuthState(),!1):t&&!n?!1:t&&e&&n}),ke=v(()=>{var t;return((t=c.value)==null?void 0:t.isAcceptNonUsers)==="1"}),Te=async()=>{const t=ie.get("userInfoLast");if(await Be(),t!=null&&t.id&&!Y.value&&!h.query.isLogin&&!ke.value){const e=_.currentRoute.value.fullPath+"&isLogin=true";e!=="/require-login"&&e!=="/login"&&_.push(`/require-login?redirect=${encodeURIComponent(e)}`)}Y.value&&!h.query.deptId&&fe()};return Me(async()=>{await me(),Te()}),(t,e)=>{var H;const n=Ue,o=Qe,u=je,y=$e,x=Fe,G=Pe,qe=Ve;return r(),d("div",nt,[a(F)?(r(),d("div",it,[s("div",lt,[s("div",rt,[s("div",at,[s("img",{class:"w-1.5rem h-1.5rem mr-0.3125rem",src:ze,onClick:ae,style:{"vertical-align":"bottom","margin-top":"0.3125rem",cursor:"pointer"}}),s("div",ct,[s("h2",dt,f(a(c).questionnaireName),1),s("h3",ut,f(a(c).subName),1)])]),s("div",pt,[s("button",{type:"button",class:"question-action-btn",onClick:le},[s("img",{class:"question-action-btn-icon",src:a(S)?a(tt):a(st),alt:""},null,8,ft),e[5]||(e[5]=s("span",{class:"question-action-btn-text"},"收藏",-1))]),s("button",{type:"button",class:"question-action-btn",onClick:re},[s("img",{class:"question-action-btn-icon",src:a(ot),alt:""},null,8,ht),e[6]||(e[6]=s("span",{class:"question-action-btn-text"},"分享",-1))])])]),a(k)?(r(),d("div",mt,[s("div",null,[e[7]||(e[7]=s("span",{class:"top-text-one"},"主辦單位",-1)),s("span",yt,f(a(c)?a(c).organizerDeptName:"暂无"),1)]),s("div",null,[e[8]||(e[8]=s("span",{class:"top-text-one"},"發佈時間",-1)),s("span",wt,f(a(c)?N(a(c).startTime):"暂无"),1)]),s("div",null,[e[9]||(e[9]=s("span",{class:"top-text-one"},"開始日期",-1)),s("span",_t,f(a(c)?N(a(c).joinStartTime):"暂无"),1)]),s("div",null,[e[10]||(e[10]=s("span",{class:"top-text-one"},"結束日期",-1)),s("span",xt,f(a(c)?N(a(c).joinEndTime):"暂无"),1)]),a(c).isHaveJoinPoints!=0?(r(),d("div",vt,[e[11]||(e[11]=s("span",{class:"top-text-one"},"參與積分",-1)),e[12]||(e[12]=s("img",{src:Je,alt:"",class:"w-1rem h-1rem mb-0.125rem",style:{"vertical-align":"bottom"}},null,-1)),s("span",gt,f((H=a(c).joinPoints)!=null?H:""),1)])):p("",!0)])):p("",!0),s("div",bt,[a(k)&&!a(O)&&a(c).showType==1?(r(),d("div",kt,[s("div",Tt,[s("div",qt,[s("div",null,[s("span",Lt,f(a(P)),1),s("span",At," / "+f(a(Q))+" 題",1)]),s("button",{disabled:a($)=="1",class:"finish-question",onClick:ve}," 完成問卷 ",8,Ct)]),s("div",Ot,[s("div",It,[s("div",{class:"progress-bar",style:Ne({width:a(ue)+"%"})},null,4)])])]),s("div",St,[s("div",Mt,[(r(!0),d(q,null,L(a(c).researchMasterQuestions,(i,ys)=>(r(),d("div",{class:"question-content flex flex-col flex-wrap",key:i.id},[s("div",Nt,[i.isRequired==1?(r(),d("span",Et,"*")):p("",!0),s("div",Vt,f(i.questionText),1),g(n,{content:i.questionAnnotation,placement:"top",style:{height:"14px"},effect:"light"},{default:w(()=>[...e[13]||(e[13]=[s("img",{src:We,class:"w-14px h-14px mt-4px",alt:"",style:{"vertical-align":"middle"}},null,-1)])]),_:1},8,["content"]),e[14]||(e[14]=s("span",{style:{"font-weight":"400","font-size":"12px","min-width":"40px","text-align":"center",color:"#e60013"}}," 註解 ",-1))]),s("div",Dt,[i.questionImage?(r(),d("div",Bt,[s("img",{src:i.questionImage,alt:"",class:"w-full h-full object-cover rounded img-border",style:{"aspect-ratio":"3/4"}},null,8,Ut)])):p("",!0),s("div",jt,[i.questionType==2?(r(),d("div",Ft,[D(s("textarea",{"onUpdate:modelValue":l=>i.userAnswer=l,type:"textarea",placeholder:"輸入答案",class:"w-100% h-7.5rem pl-8px pt-8px",style:{"background-color":"#f8f7f7",outline:"none",border:"0"}},null,8,$t),[[B,i.userAnswer]])])):p("",!0),i.questionType==3?(r(),d("div",Pt,[(r(!0),d(q,null,L(i.questionOptionList,l=>(r(),d("div",{onClick:K=>ge(i.id,l.id,l.optionText),class:Z(i.optionList&&i.optionListTwo.includes(l.id)?"little-check-box":"little-check-box2"),key:l.id,style:{"min-width":"148px"}},[i.optionList&&i.optionListTwo.includes(l.id)?(r(),d("img",Rt)):(r(),d("img",zt)),s("div",Jt,f(l.optionCode=="other"?"":l.optionCode),1),s("div",Wt,f(l.optionText),1)],10,Qt))),128)),W(i)?D((r(),d("input",{key:0,"onUpdate:modelValue":l=>i.otherAnswer=l,onInput:l=>be(i),type:"text",class:"w-100% h-2.5rem pl-8px",placeholder:"請輸入其他選項内容",style:{"background-color":"#f8f7f7",outline:"none",border:"0"}},null,40,Yt)),[[B,i.otherAnswer]]):p("",!0)])):p("",!0),i.questionType==4?(r(),d("div",Gt,[(r(!0),d(q,null,L(i.questionOptionList,l=>(r(),d("div",{onClick:K=>_e(i.id,l.id,l.optionText),class:Z([E(i,l.id)?"little-check-box":"little-check-box2","cursor-pointer mul-button"]),key:l.id},[E(i,l.id)?(r(),d("img",Kt)):p("",!0),E(i,l.id)?p("",!0):(r(),d("img",Xt)),s("span",Zt,f(l.optionCode=="other"?"":l.optionCode),1),s("span",es,f(l.optionText),1)],10,Ht))),128)),J(i)?D((r(),d("input",{key:0,"onUpdate:modelValue":l=>i.otherAnswer=l,onInput:l=>we(i),type:"text",class:"w-100% h-2.5rem pl-8px",placeholder:"請輸入其他選項内容",style:{"background-color":"#f8f7f7",outline:"none",border:"0"}},null,40,ts)),[[B,i.otherAnswer]]):p("",!0)])):p("",!0),i.questionType==5?(r(),d("div",ss,[g(u,{onChange:ye,class:"w-100% h-2.5rem",modelValue:a(I),"onUpdate:modelValue":e[0]||(e[0]=l=>V(I)?I.value=l:null),placeholder:"輸入答案",size:"large",style:{width:"100%"}},{default:w(()=>[(r(!0),d(q,null,L(i.questionOptionList,l=>(r(),ee(o,{key:l.id,label:l.optionText,value:l.id},null,8,["label","value"]))),128))]),_:2},1032,["modelValue"])])):p("",!0),String(i.questionType)==="6"?(r(),d("div",os,[s("div",ns,f(z(i).min),1),R(i).length?(r(),d("div",is,[(r(!0),d(q,null,L(R(i),l=>(r(),d("div",{onClick:K=>pe(l,i),key:l},[i.selectedScore==l?(r(),d("img",rs)):p("",!0),i.selectedScore!=l?(r(),d("img",as)):p("",!0)],8,ls))),128))])):p("",!0),s("div",cs,f(z(i).max),1)])):p("",!0)])])]))),128))])])])):p("",!0),a(O)||a(c).showType==2?(r(),d("div",ds,[e[17]||(e[17]=s("h1",{class:"finish-text mb-3%"},"完成問卷",-1)),e[18]||(e[18]=s("img",{src:He,alt:"",class:"finish-kids-illustration mb-6% mt-2%"},null,-1)),p("",!0),s("button",{class:"w-33% h-7.6% mt-3% finish-else",onClick:e[1]||(e[1]=()=>{a(_).push("/question")})}," 查看其他問卷 ")])):p("",!0)])])])):p("",!0),g(qe,{modelValue:a(T),"onUpdate:modelValue":e[4]||(e[4]=i=>V(T)?T.value=i:null),style:{"border-radius":"16px"},width:"500px",top:"15%","close-on-click-modal":!1},{footer:w(()=>[s("div",ps,[g(G,{onClick:e[3]||(e[3]=i=>T.value=!1),class:"w-212px h-40px confirm-cancel"},{default:w(()=>[te(f(t.$t("common.cancel")),1)]),_:1}),g(G,{type:"primary",onClick:he,class:"w-212px h-40px confirm-button"},{default:w(()=>[te(f(t.$t("common.ok")),1)]),_:1})])]),default:w(()=>[g(x,null,{default:w(()=>[s("h2",us,f(t.$t("common.selectText")),1),e[19]||(e[19]=s("h3",{class:"pls-select-span"},"您有多個工會可供選擇,請選擇要參與的工會。",-1)),g(y,null,{default:w(()=>[g(u,{modelValue:a(b),"onUpdate:modelValue":e[2]||(e[2]=i=>V(b)?b.value=i:null),class:"select-union",placeholder:"選擇參與的工會",clearable:""},{default:w(()=>[(r(!0),d(q,null,L(a(M),i=>(r(),ee(o,{key:i.id,label:i.name,value:i.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}}}
1),$s=Re(fs,[["__scopeId","data-v-76a8ff1a"]]);export{$s as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.