這些函式的行為會受到 php.ini 中設定的影響。
當 mbstring 模組可用時,Exif 支援自動轉換使用者註釋的 Unicode 和 JIS 字元編碼。這是透過先使用指定的字元集解碼註釋來完成的。然後,結果會使用另一個應該與您的 HTTP
輸出相符的字元集進行編碼。
名稱 | 預設值 | 可變更性 | 變更紀錄 |
---|---|---|---|
exif.encode_unicode | "ISO-8859-15" | INI_ALL |
|
exif.decode_unicode_motorola | "UCS-2BE" | INI_ALL |
|
exif.decode_unicode_intel | "UCS-2LE" | INI_ALL |
|
exif.encode_jis | "" | INI_ALL |
|
exif.decode_jis_motorola | "JIS" | INI_ALL |
|
exif.decode_jis_intel | "JIS" | INI_ALL |
以下是設定指令的簡短說明。
exif.encode_unicode
字串
exif.encode_unicode
定義 UNICODE 使用者註釋的字元集處理方式。預設值為 ISO-8859-15,適用於大多數非亞洲國家。此設定可以留空,或必須是 mbstring 支援的編碼。如果留空,則使用 mbstring 目前的內部編碼。
exif.decode_unicode_motorola
字串
exif.decode_unicode_motorola
定義影像內部 Unicode 編碼使用者註釋的字元集(如果影像採用 Motorola 位元組順序,即大端序)。此設定不可留空,但您可以指定 mbstring 支援的編碼列表。預設值為 UCS-2BE。
exif.decode_unicode_intel
字串
exif.decode_unicode_intel
定義影像內部 Unicode 編碼使用者註釋的字元集(如果影像採用 Intel 位元組順序,即小端序)。此設定不可留空,但您可以指定 mbstring 支援的編碼列表。預設值為 UCS-2LE。
exif.encode_jis
字串
exif.encode_jis
定義 JIS 使用者註釋的字元集處理方式。預設值為空值,強制函式使用 mbstring 目前的內部編碼。
exif.decode_jis_motorola
字串
exif.decode_jis_motorola
定義影像內部 JIS 編碼使用者註釋的字元集(如果影像採用 Motorola 位元組順序,即大端序)。此設定不可留空,但您可以指定 mbstring 支援的編碼列表。預設值為 JIS。
exif.decode_jis_intel
字串
exif.decode_jis_intel
定義影像內部 JIS 編碼使用者註釋的字元集(如果影像採用 Intel 位元組順序,即小端序)。此設定不可留空,但您可以指定 mbstring 支援的編碼列表。預設值為 JIS。