UnicodeTranscode.Options
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
วิธีการสืบทอด
จากคลาส java.lang.Object บูลีน | เท่ากับ (วัตถุ arg0) |
คลาสสุดท้าย<?> | รับคลาส () |
ภายใน | แฮชโค้ด () |
โมฆะสุดท้าย | แจ้ง () |
โมฆะสุดท้าย | แจ้งทั้งหมด () |
สตริง | toString () |
โมฆะสุดท้าย | รอสักครู่ (ยาว arg0, int arg1) |
โมฆะสุดท้าย | รอ (ยาว arg0) |
โมฆะสุดท้าย | รอ () |
วิธีการสาธารณะ
พารามิเตอร์
ข้อผิดพลาด | นโยบายการจัดการข้อผิดพลาดเมื่อพบการจัดรูปแบบที่ไม่ถูกต้องในอินพุต ค่า 'เข้มงวด' จะทำให้การดำเนินการสร้างข้อผิดพลาด InvalidArgument ในการจัดรูปแบบอินพุตที่ไม่ถูกต้อง ค่า 'แทนที่' (ค่าเริ่มต้น) จะทำให้การดำเนินการแทนที่การจัดรูปแบบที่ไม่ถูกต้องในอินพุตด้วยจุดโค้ด `replacement_char` ค่า 'ละเว้น' จะทำให้การดำเนินการข้ามการจัดรูปแบบที่ไม่ถูกต้องในอินพุต และไม่มีอักขระเอาต์พุตที่สอดคล้องกัน |
---|
UnicodeTranscode.Options สาธารณะ แทนที่ControlCharacters (บูลีนแทนที่ControlCharacters)
พารามิเตอร์
แทนที่ControlCharacters | ว่าจะแทนที่อักขระควบคุม C0 (00-1F) ด้วย `replacement_char` หรือไม่ ค่าเริ่มต้นเป็นเท็จ |
---|
พารามิเตอร์
ทดแทนChar | จุดโค้ดอักขระทดแทนที่จะใช้แทนการจัดรูปแบบที่ไม่ถูกต้องในอินพุตเมื่อ `errors='replace'' สามารถใช้จุดโค้ดยูนิโค้ดที่ถูกต้องได้ ค่าเริ่มต้นคืออักขระแทนที่ Unicode เริ่มต้นคือ 0xFFFD หรือ U+65533) โปรดทราบว่าสำหรับ UTF-8 การส่งอักขระแทนที่ที่แสดงเป็น 1 ไบต์ เช่น ' ' จะคงการจัดแนวสตริงไว้ที่ต้นทาง เนื่องจากไบต์ที่ไม่ถูกต้องจะถูกแทนที่ด้วยการแทนที่ 1 ไบต์ สำหรับ UTF-16-BE และ UTF-16-LE อักขระแทนที่ 1 หรือ 2 ไบต์ใดๆ จะรักษาการจัดตำแหน่งของไบต์กับแหล่งที่มา |
---|
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[],[],null,["# UnicodeTranscode.Options\n\npublic static class **UnicodeTranscode.Options** \nOptional attributes for [UnicodeTranscode](/jvm/api_docs/java/org/tensorflow/op/strings/UnicodeTranscode) \n\n### Public Methods\n\n|---------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [UnicodeTranscode.Options](/jvm/api_docs/java/org/tensorflow/op/strings/UnicodeTranscode.Options) | [errors](/jvm/api_docs/java/org/tensorflow/op/strings/UnicodeTranscode.Options#errors(java.lang.String))(String errors) |\n| [UnicodeTranscode.Options](/jvm/api_docs/java/org/tensorflow/op/strings/UnicodeTranscode.Options) | [replaceControlCharacters](/jvm/api_docs/java/org/tensorflow/op/strings/UnicodeTranscode.Options#replaceControlCharacters(java.lang.Boolean))(Boolean replaceControlCharacters) |\n| [UnicodeTranscode.Options](/jvm/api_docs/java/org/tensorflow/op/strings/UnicodeTranscode.Options) | [replacementChar](/jvm/api_docs/java/org/tensorflow/op/strings/UnicodeTranscode.Options#replacementChar(java.lang.Long))(Long replacementChar) |\n\n### Inherited Methods\n\nFrom class java.lang.Object \n\n|------------------|---------------------------|\n| boolean | equals(Object arg0) |\n| final Class\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| String | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Methods\n--------------\n\n#### public [UnicodeTranscode.Options](/jvm/api_docs/java/org/tensorflow/op/strings/UnicodeTranscode.Options)\n**errors**\n(String errors)\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| errors | Error handling policy when there is invalid formatting found in the input. The value of 'strict' will cause the operation to produce a InvalidArgument error on any invalid input formatting. A value of 'replace' (the default) will cause the operation to replace any invalid formatting in the input with the \\`replacement_char\\` codepoint. A value of 'ignore' will cause the operation to skip any invalid formatting in the input and produce no corresponding output character. |\n|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n\n#### public [UnicodeTranscode.Options](/jvm/api_docs/java/org/tensorflow/op/strings/UnicodeTranscode.Options)\n**replaceControlCharacters**\n(Boolean replaceControlCharacters)\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| replaceControlCharacters | Whether to replace the C0 control characters (00-1F) with the \\`replacement_char\\`. Default is false. |\n|--------------------------|-------------------------------------------------------------------------------------------------------|\n\n#### public [UnicodeTranscode.Options](/jvm/api_docs/java/org/tensorflow/op/strings/UnicodeTranscode.Options)\n**replacementChar**\n(Long replacementChar)\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| replacementChar | The replacement character codepoint to be used in place of any invalid formatting in the input when \\`errors='replace'\\`. Any valid unicode codepoint may be used. The default value is the default unicode replacement character is 0xFFFD or U+65533.) Note that for UTF-8, passing a replacement character expressible in 1 byte, such as ' ', will preserve string alignment to the source since invalid bytes will be replaced with a 1-byte replacement. For UTF-16-BE and UTF-16-LE, any 1 or 2 byte replacement character will preserve byte alignment to the source. |\n|-----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|"]]