как решить эту проблему? NotSupportedException: Encoding 1252 data could not be found.…
- User
как решить эту проблему? NotSupportedException: Encoding 1252 data could not be found. Make sure you have correct international codeset assembly installed and enabled. at System.Text.Encoding.GetEncoding (System.Int32 codepage) [0x0022d] in :0 at System.Text.Encoding.GetEncoding (System.String name) [0x00012] in :0 at iTextSharp.text.pdf.RandomAccessFileOrArray.ReadString (System.Int32 length, System.String encoding) [0x0000e] in <2461fa44c0954a4a9b6ede997d3e1072>:0 at iTextSharp.text.pdf.TrueTypeFont.ReadStandardString (System.Int32 length) [0x00000] in <2461fa44c0954a4a9b6ede997d3e1072>:0 at iTextSharp.text.pdf.TrueTypeFont.Process (System.Byte[] ttfAfm, System.Boolean preload) [0x00196] in <2461fa44c0954a4a9b6ede997d3e1072>:0 at iTextSharp.text.pdf.TrueTypeFontUnicode..ctor (System.String ttFile, System.String enc, System.Boolean emb, System.Byte[] ttfAfm, System.Boolean forceRead) [0x000f7] in <2461fa44c0954a4a9b6ede997d3e1072>:0 at iTextSharp.text.pdf.BaseFont.CreateFont (System.String name, System.String encoding, System.Boolean embedded, System.Boolean cached, System.Byte[] ttfAfm, System.Byte[] pfb, System.Boolean noThrow, System.Boolean forceRead) [0x00173] in <2461fa44c0954a4a9b6ede997d3e1072>:0 at iTextSharp.text.pdf.BaseFont.CreateFont (System.String name, System.String encoding, System.Boolean embedded, System.Boolean cached, System.Byte[] ttfAfm, System.Byte[] pfb, System.Boolean noThrow) [0x00000] in <2461fa44c0954a4a9b6ede997d3e1072>:0 at iTextSharp.text.pdf.BaseFont.CreateFont (System.String name, System.String encoding, System.Boolean embedded) [0x00000] in <2461fa44c0954a4a9b6ede997d3e1072>:0 at PDFGenerator.CreatePDF (DataBase.User user) [0x00069] in :0 at ArchivePanel.DowlandPDF () [0x00006] in :0 at UnityEngine.Events.InvokableCall.Invoke () [0x00010] in <1ccd58199f0848e28788a0d44e54d18d>:0 at UnityEngine.Events.UnityEvent.Invoke () [0x00022] in <1ccd58199f0848e28788a0d44e54d18d>:0 at UnityEngine.UI.Button.Press () [0x0001c] in :0 at UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) [0x00009] in :0 at UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00007] in :0 at UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) [0x00067] in :0
- Assistant
Ошибка, с которой вы столкнулись, указывает на то, что конкретная кодировка (в данном случае, 1252) не поддерживается в вашей среде выполнения. Такая ситуация часто возникает, когда кодировки, отличные от UTF-8, не включены в сборку или отсутствуют в настройках среды выполнения.
- User
мне нужно чтото сделать с этим кодом? using DataBase; using iTextSharp.text; using iTextSharp.text.pdf; using System.Collections; using System.Collections.Generic; using System.IO; using System.Text.RegularExpressions; using UnityEngine; using Font = iTextSharp.text.Font;
- Assistant
- User
пишет что не доступен из-за уровня защиты CodePagesEncodingProvider
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.