1. Discussion forum
2. Determining tag names
3. Problems with duplicate tags
4. Aperture and shutter speed
5. Date and time formats
6. "Can't convert TAG" errors
7. Deleting all EXIF from a TIFF
8. Writing Make, Model & MakerNotes
9. Tag locations when copying
10. Coded character sets
11. User-defined tags
12. Export to database
13. Output file size
14. GPS coordinate format
15. MakerNote errors
16. Some files not renamed
17. List-type tags
18. Windows character encoding
19. Formatting tag values

# ExifTool FAQ

1. "Is there a forum for discussing ExifTool issues?"

> ExifTool issues can be discussed on the CPAN forum at http://www.cpanforum.com/dist/Image-ExifTool

2. "How do I determine the tag name for some information?"

> When you run exiftool, by default it prints descriptions, not tag names, for the information it extracts. To print the tag names instead, use the `-s` option. Also, see the tag names documentation for a complete list of available tag names.

> Tag names may be optionally prefixed by a family 0 or 1 group name to specify a particular information type or location. Use the `-g0` and `-g1` (or `-G0` and `-G1`) options when extracting information to see the corresponding group names.

3a. "ExifTool reports the wrong value or doesn't extract a tag",
3b. "ExifTool doesn't write a tag properly", or
3c. "Other software can't read information written by ExifTool"

> Make sure you are looking at the right information. Information may be duplicated in different locations within an image. When in doubt, use "`exiftool -a -G1 FILENAME`" to show all information and the locations in the file. In this command, `-a` allows duplicate tags to be displayed, `-G1` shows the family 1 group name (ie. the location) of each tag, and "`FILENAME`" is the name of your image file. Also, it may be helpful to add `-s` to show the actual tag names instead of the descriptions (and possibly `-D` or `-H` to show the tag ID numbers if you are familiar with these).

> When duplicate tags exist, only one is extracted unless the `-a` option is used. Beware that options like `-EXIF:all` select all EXIF tags from the extracted tags, so EXIF tags hidden by duplicate tags in other locations will not appear in the output for `-EXIF:all`. For example, the command

>     exiftool -gps:all image.jpg

> will NOT necessarily extract all GPS tags because some GPS tags may have been suppressed by same-named tags in other groups. To be sure all GPS tags are extracted, the `-a` option must be used:

>     exiftool -a -gps:all image.jpg

> If you are having problems with other software reading information written by ExifTool, if possible try first writing the information from the other software, then use ExifTool to determine where the information was written. Once you know where it should go, you can use ExifTool to write to this location.

> You can read or write information in a specific location by prefixing the tag name on the command line with the desired group name. ie) "`-ExifIFD:DateTimeOriginal`"

4. "ExifTool reports more than one shutter speed or aperture value, and they are slightly different"

> There are a number of different ways that aperture and shutter speed information are stored in many images. The standard EXIF values (EXIF:FNumber and EXIF:ExposureTime) should correspond to the values displayed by your camera, but these values may have been rounded off. The corresponding EXIF APEX values (EXIF:ApertureValue and EXIF:ShutterSpeedValue) may be different due to their own round-off errors. If available, the MakerNotes values may be the most accurate because they haven't been rounded off to nice even values for display, so with these you may see odd values like 1/102 instead of 1/100, etc.

5. "How do I format date and time information for writing?"

> All information (including date/time information) is written in the same format as it is read out. When reading, ExifTool converts all date and time information to standard EXIF format, so this is also the way it is specified when writing. The standard EXIF date/time format is "`YYYY:MM:DD hh:mm:ss`", and some meta information formats such as XMP also allow sub-seconds and a timezone to be specified. The timezone format is "`+hh:mm`", "`-hh:mm`" or "`Z`". For example:

>     exiftool -xmp:dateTimeOriginal="2005:10:23 20:06:34.33-05:00" a.jpg

> ExifTool will attempt to reformat input date/time values into the standard format unless the `-n` option is used.

6. "I get the following error when writing a tag: '`Can't convert TAG (not in PrintConv)`'"

> By default, ExifTool applies a print conversion (PrintConv) to extracted information to make the output more human-readable. Some conversions involve lookup tables which are documented in the Values column of the Tag Name documentation. For example, the GPSAltitudeRef tag defines the following conversions:

>     0 = Above Sea Level
>     1 = Below Sea Level

> For this tag, a value of '0' is printed as 'Above Sea Level', and '1' is printed as 'Below Sea Level'. Reading and writing with ExifTool is symmetrical [with the possible exception of List-type tags -- see FAQ #17 below], so a value that is printed as 'Above Sea Level' must also be written in that form. (ie. The inverse print conversion is applied when writing values.) For example, to write GPSAltitudeRef you can type:

>     exiftool -gpsaltituderef="Above Sea Level" image.jpg

> or any unambiguous short form may be used and ExifTool will know what you mean, ie)

>     exiftool -gpsaltituderef=above image.jpg

> Alternatively, the print conversion can be disabled with the `-n` option. In this case the printed value of GPSAltitudeRef will be '0' or '1', and the value is written in the same way. So the following command has exactly the same effect as the commands above:

>     exiftool -gpsaltituderef=0 -n image.jpg

> Integer values may also be specified in hexadecimal (with a leading '0x'). For example, the following commands are all valid and accomplish the same thing:

>     exiftool -flash=1 -n image.jpg
>     exiftool -flash=0x1 -n image.jpg
>     exiftool -flash=fired image.jpg

> Programmers: The two techniques look like this when calling Image::ExifTool functions from a Perl script:

>     $exifTool->SetNewValue(GPSAltitudeRef => 'Above Sea Level');
>     $exifTool->SetNewValue(GPSAltitudeRef => 0, Type => 'ValueConv');

7. "I can't delete all EXIF information from a TIFF file using '`exiftool -exif:all= img.tif`'"

> This is because of the way a TIFF file is structured. With a JPEG image, this command will remove IFD0 (the main Image File Directory) as well as any subdirectories, thus removing all EXIF information. But with the TIFF format, the main image itself is stored in IFD0, so deleting this directory would destroy the image. Instead, ExifTool just deletes the ExifIFD subdirectory, so any information stored in other directories is preserved.

> Use "`exiftool -a -G1 -s img.tif`" to see where the information is stored. Any information remaining in other IFD's must be deleted separately from a TIFF file if desired.

8a. "All maker note information is lost if I change the Make or Model tag", or
8b. "I can't copy maker note information to an image"

> The Make and Model tags are used by some image utilities (including ExifTool) to determine the format of the maker note information. Deleting or changing either of these tags may prevent these utilities from recognizing or properly interpreting the maker notes. Also beware that the maker notes information may be damaged if an image is edited when the maker notes are not properly recognized. So it is a good idea not to edit the Make and Model tags in the first place.

> If you really want to delete the Make and Model information, you might as well delete the maker notes too. You can do this with the either of the following commands:

>     exiftool -make= -model= -makernotes:all= image.jpg
>     exiftool -make= -model= -makernotes= image.jpg

> For the same reason, maker notes can not be copied to an image with an incompatible Make or Model. To do this, the Make and Model tags must also be copied. ie)

>     exiftool -tagsfromfile src.jpg -makernotes -make -model dst.jpg

> (Note that in this case the "`-makernotes:all`" syntax does not work because it attempts to copy the maker note tags individually, but they must be copied as a block with "`-makernotes`".)

9a. "The information is different when I copy all tags to a new file", or
9b. "The tag locations change when I use `-tagsfromfile` to copy information"

> This feature is explained under the `-tagsFromFile` option in the exiftool application documentation, but the question is common enough that it is discussed here in more detail.

> By default, ExifTool will store information in preferred locations when either writing new information or copying information between files. This freedom allows ExifTool to write or copy information to files of different formats without requiring the user to know details about where the information is stored.

> The preferred locations for information written to JPEG images are 1) EXIF, 2) IPTC and 3) XMP. As an example, information extracted from the maker notes will be preferentially written (on a tag-by-tag basis) in EXIF format when copying information between two JPEG images. But if a specific tag doesn't exist in EXIF, then the tag is written to the first valid group in the order specified above. The advantage of "translating" the information to EXIF is that it then becomes readable by applications which only support standard EXIF. The disadvantage is that you don't get an exact copy of the original information structure.

> But ExifTool gives you the ability to customize this behaviour to write the information to wherever you want. This is done by specifying a group name for the tag(s) to be copied. This applies even if the group name is "`all`", in which case the original group is preserved. So to copy all information and preserve the original structure, use this syntax:

>     exiftool -tagsfromfile src.jpg -all:all dst.jpg

> By specifying a group name with "`-all:all`", the location of the information is preserved. (Specifically, since no destination tag was specified the source group "`all`" was assumed, thus preserving the original group.)

> Here are some examples to show you the type of control you have over where the information is written. All commands in each example are equivalent:

>     # copy all tags to preferred groups (no destination group)
>     exiftool -tagsfromfile src.jpg dst.jpg
>     exiftool -tagsfromfile src.jpg -all dst.jpg
>     exiftool -tagsfromfile src.jpg "-all>all" dst.jpg
>     exiftool -tagsfromfile src.jpg "-all:all>all" dst.jpg

>     # copy all tags, preserving original group (destination group 'all')
>     exiftool -tagsfromfile src.jpg -all:all dst.jpg
>     exiftool -tagsfromfile src.jpg "-all>all:all" dst.jpg
>     exiftool -tagsfromfile src.jpg "-all:all>all:all" dst.jpg

>     # copy all tags to EXIF group only (destination group 'exif')
>     exiftool -tagsfromfile src.jpg "-all>exif:all" dst.jpg
>     exiftool -tagsfromfile src.jpg "-all:all>exif:all" dst.jpg

>     # copy XMP tags to XMP group (destination group 'xmp' or 'all')
>     exiftool -tagsfromfile src.jpg "-xmp:all" dst.jpg
>     exiftool -tagsfromfile src.jpg "-xmp:all>xmp:all" dst.jpg
>     exiftool -tagsfromfile src.jpg "-xmp:all>all:all" dst.jpg

>     # copy XMP tags to preferred groups (no destination group)
>     exiftool -tagsfromfile src.jpg "-xmp:all>all" dst.jpg

>     # copy XMP tags to EXIF only (destination group 'exif')
>     exiftool -tagsfromfile src.jpg "-xmp:all>exif:all" dst.jpg

> The same rules illustrated above also apply when copying individual tags.

> Note: If no destination group is specified, a new tag is created if necessary only in the preferred group, but if the same tag already exists in another group, then this information is also updated. (Otherwise inconsistent values for the same information would exist in different locations. Of course, you can always generate inconsistencies like this if you really want to by specifically writing contradictory information to different groups.)

10. "How does ExifTool handle coded character sets?"

> [also see FAQ number 18 for help on displaying special characters in a Windows console.]

> Certain meta information formats allow coded character sets other than plain ASCII. When reading, 8‑bit encodings are passed straight through ExifTool without translation (unless otherwise specified below), and multi-byte encodings are translated to UTF‑8 by default, or Windows Latin1 with the `-L` option (or by setting the "`Charset`" option to "`Latin`" via the API). When writing, the inverse translations are performed. (Alternatively, special characters may be translated to HTML character entities by using the `-E` option, but this only applies when reading.) More specific details are given below about how character coding is handled for EXIF, IPTC, XMP, ID3 and PDF information:

> EXIF: Most textual EXIF information is stored in ASCII format, however some EXIF tags (UserComment, GPSProcessingMethod and GPSAreaInformation) may be also be encoded in Unicode or JIS. When reading information, Unicode text is translated to UTF‑8, or Windows Latin1 with the `-L` option. Other encodings are not translated. When writing, text is stored as ASCII unless the string contains special characters, in which case it is translated from UTF‑8 or Latin1 (depending on the `-L` option) and stored as Unicode if allowed by the tag specification. The EXIF "XP" tags (XPTitle, XPComment, etc) are always stored as Unicode, and are read and written as either UTF‑8, or Windows Latin1 with the `-L` option.

> IPTC: The value of the IPTC:CodedCharacterSet tag determines how the internal IPTC string values are interpreted. If CodedCharacterSet exists and has a value of "`UTF8`" (or "`ESC % G`") then string values are assumed to be stored as UTF‑8, otherwise Latin1 (cp1252) coding is assumed. When reading, these strings are translated to UTF‑8 by default, or Latin1 with the `-L` option. When writing, the inverse translation is performed. No translation is done if the internal (IPTC) and external (ExifTool) character sets are the same. Note that ISO 2022 character set shifting is not supported. Instead, a warning is issued and the string is not translated if an ISO 2022 shift code is found. See the IPTC specification for more information about IPTC character coding.

> XMP: Exiftool reads XMP encoded as UTF‑8, UTF‑16 or UTF‑32, and converts them all to UTF‑8 internally. Also, all XML character entity references and numeric character references are converted. When writing, ExifTool always encodes XMP as UTF‑8, converting the following 5 characters to XML character references: `& < > ' "`. By default no further translation is performed, however the `-L` option may be used used to translate text to Windows Latin1 when reading or from Windows Latin1 when writing.

> ID3: The ID3v1 specification officially supports only ISO 8859‑1 encoding although some applications may incorrectly use other character sets. ExifTool assumes proper ISO 8859‑1 encoding and translates to UTF‑8 by default, or disables translation with the `-L` option (since ISO 8859‑1 is a subset of Windows Latin1). ID3v2 text is may be stored with a number of different encodings, and ExifTool translates them all to UTF‑8 by default or Windows Latin1 with the `-L` option. ExifTool does not currently write ID3 information.

> PDF: PDF text strings are stored in either PDFDocEncoding (similar to Windows Latin1) or Unicode (UCS‑2). When reading, ExifTool translates to UTF‑8 by default, or Windows Latin1 with the `-L` option. When writing, exiftool encodes UTF‑8 or Latin1 text as Unicode only if the string contains special characters, otherwise PDFDocEncoding is used.

> MIE: MIE strings are stored as either UTF‑8 or ISO 8859‑1. When reading, UTF‑8 strings are translated to Latin only if the `-L` option is used, and ISO 8859‑1 strings are never translated. When writing, input strings are translated from Latin1 to UTF‑8 only if the `-L` option is used, otherwise no translation is performed. The resulting strings are stored as UTF‑8 if they contain multi-byte UTF‑8 character sequences, otherwise they are assumed to be ISO 8859‑1.

11. "My user-defined tags don't work"

> For examples of how to add user-defined tags, see the ExifTool_config file in the ExifTool distribution. To activate this file, rename it to "`.ExifTool_config`" and copy it to your HOME directory. (Windows users must rename the file using the "`rename`" command in a cmd shell becaues the Windows GUI won't let you use a file name beginning with a "`.`".) With this installed, you should be able to write and read the example tags (such as "`NewXMPxxxTag1`"). Try this first before you attempt to define your own tags.

> If this doesn't work, the most common problem is that the "`.ExifTool_config`" configuration file isn't getting loaded properly, and there are two things you can try: 1) Set either the HOME or the EXIFTOOL_HOME environment variable to the name of the directory where you put your "`.ExifTool_config`" file, or 2) put the config file in the same directory as the exiftool script. (Also, be sure the config filename starts with a dot! In the Windows GUI you may be not be able to generate a file name that starts with a '`.`', but it can be done from the command line using the '`rename`' command.)

> If necessary, you can verify that ExifTool is loading your config file by adding the following line to your file:

>     print "LOADED!\n";

> If you see a "`LOADED!`" message when you run exiftool, but your new tags still don't work, make sure you are using the proper tag name and that the file you are writing can support these names. Try copying the "`t/images/Writer.jpg`" file from the distribution and running exiftool with the following command:

>     exiftool -v3 -NewXMPxxxTag1=test Writer.jpg

> If ExifTool recognizes the new tag, the first line of output from this command should be

>     "Writing XMP-xxx:NewXMPxxxTag1"

> Then you can read back the new tag with "`exiftool -s Writer.jpg`".

> To specify the config file directory from within a Perl script when using the ExifTool API, set the EXIFTOOL_HOME environment variable before loading the ExifTool module:

>     BEGIN { $ENV{EXIFTOOL_HOME} = '/config_file_directory' }
>     use Image::ExifTool;

12. "How do I export information from exiftool into a database?"

> It is often easiest to export information formatted as a tab-delimited list of values. The following exiftool options may be useful for this purpose:

>     -t  - use a tab instead of spaces to separate output values
>     -S  - very short format (with -t, prints only tag values)
>     -q  - quiet (suppresses any other messages)
>     -f  - force '-' to be printed for non-existent values
>     -T  - shortcut for the combination of all above options (-t -S -q -f)
>     -r  - recursively process files in subdirectories

> And here is an example command line:

>     exiftool -T -r -filename -aperture -ISO t/images > out.txt

> This command recursively processes all images in the "`t/images`" directory, extracting FileName, Aperture and ISO tags, and writing the output to a file called "`out.txt`". After the command has executed, the output file will contain information in the following format:

>     Canon.jpg       14.0    100
>     Casio.jpg       2.0     -
>     Nikon.nef       3.5     200
>     OlympusE1.jpg   4.5     400

> It should be possible to import a file like this directly into most database applications. On the command line, any list of tag names may be used, and any number of file or directory names may be specified. (Hint: If your command line starts to get too long, you may want to look into using the `-@` option and/or the ShortCut feature).

> Another approach is to export information in RDF/XML format using the `-X` option, or JSON (JavaScript Object Notation) using the `-j` option. These methods allow transfer of more complex data sets, but require that the importing software supports these formats.

13. "Why is my file smaller after I use ExifTool to write information?"

> There are various specific reasons why this can happen, but the general answer is: When ExifTool writes an image, the meta information may be restructured in such a way that it takes less space than in the original file.

> For instance, the EXIF/TIFF standard allows for blocks of unreferenced data to exist in an image. Some digital cameras write JPEG or TIFF-based RAW files which contain large blocks of unused data, usually filled with binary zeros. The reason for this could be to simplify camera algorithms by allowing variable-sized information to be written at fixed offsets in the output image. When ExifTool rewrites an image it does not copy these unused blocks. This can result in a significant reduction in file size for some images.

> Also, the size of an XMP record may easily shrink or grow when it is rewritten, even if no meta information is changed. This is partly due to the fact that the XMP specification recommends a few KB of padding at the end of the record (ExifTool adds 2424 bytes by default), and partly due to the flexibility of the XMP format which allows the information to be written in various styles, some of which are more compact than others.

> ExifTool does not modify the image data itself, so editing a file is "lossless" as far as the image is concerned.

14. "What format do I use for writing GPS coordinates?"

> ExifTool is very flexible in the formats allowed for entering GPS coordinates. Any string containing between 1 and 3 floating point numbers is valid. The numbers represent degrees, (and optionally) minutes and seconds.

> For EXIF GPS coordinates, the reference direction is specified separately with the EXIF:GPSLatitudeRef or EXIF:GPSLongitudeRef tag.

> For XMP GPS coordinates, the reference direction is specified within the XMP:GPSLatitude or XMP:GPSLongitude value, with west longitudes and south latitudes being specified either by negative coordinate values or by ending the string with "`W`" or "`S`".

> Here are some examples of equivalent ways to specify a GPS latitude in both EXIF and XMP:

>     exiftool -exif:gpslatitude="42 30 0.00" -exif:gpslatituderef=S a.jpg
>     exiftool -exif:gpslatitude="42 deg 30.00 min" -exif:gpslatituderef=S a.jpg
>     exiftool -exif:gpslatitude=42.5 -exif:gpslatituderef=S a.jpg

>     exiftool -xmp:gpslatitude="42 30 0.00 S" a.jpg
>     exiftool -xmp:gpslatitude=42.50S a.jpg
>     exiftool -xmp:gpslatitude=-42.5 a.jpg

> Similar styles may be used for longitude. ExifTool will convert any of these coordinate styles to the proper format for the specific tag used.

15. "I get MakerNote warnings or errors when reading or writing information"

> Problems like this may be caused by image editing software which doesn't properly update offsets in the MakerNotes when rewriting an image. In many cases, ExifTool will detect this type of problem and issue a warning like this:

>     Warning: [minor] Possibly incorrect maker notes offsets (fix by -340?)

> (Be aware that if multiple warnings occur, the `-a` option must be used so see them all, since by default only one warning is displayed per file.) If this warning occurs, you can use the `-F` option to attempt to fix the problem. When writing, `-F` applies a permanent correction to the maker notes. Note that some Makernote information may be lost permanently if the proper correction is not applied when writing images with this problem.

> Any error that occurs while writing will prevent the file from being written. However, most Makernote errors are designated as minor, which allows them to be ignored by using the `-m` option. For example:

>     Error: [minor] Bad format (65535) for MakerNotes entry 17 - image.jpg

> Using -m will downgrade the minor error to a warning, allowing the file to be written, but some Makernote information may be lost when ignoring certain types of errors like this.

16. "Why doesn't ExifTool rename my AVI files?"

> By default, ExifTool only processes writable file types† when any tag‡ is being written and a directory name is specified on the command line. To force exiftool to process other files, they must either be listed on the command line by name, or be specified using the `-ext` option, something like this:

>     exiftool -ext AVI -ext JPG -d pics/%Y/%m "-directory<dateTimeOriginal" DIR

> When a single `-ext` option is used, only files of the specified type are processed. However, multiple `-ext` options may be used in the same command (as in the example above) to process any number of different file types.

> †The `-listwf` option may be used to list all writable file types.
> ‡ This includes "pseudo" tags like FileName, Directory and FileModifyDate.

17. "List-type tags do not behave as expected"

> Tags indicated by a plus sign (`+`) in the tag name documentation are List-type tags. Two common examples of List-type tags are IPTC:Keywords and XMP:Subject. These tags may have multiple values which are combined into a single string when reading. (By default, extracted values are separated by a comma and a space, but the `-sep` option may be used to change this.) When writing, separate values are always assigned individually, like this:

>     exiftool -keywords=one -keywords=two -keywords=three DIR

> NOT all together, because this would represent a single keyword:

>     exiftool -keywords="one, two, three" test.jpg

> With exiftool version 7.56 or later, the `-sep` option may be used to split values of list-type tags into separate items. For example,

>     exiftool -sep ", " -keywords="one, two, three" DIR

> will store three separate keywords, the same as the first example above. This feature may be used to split a tag value into separate items if it was originally stored incorrectly as a single string:

>     exiftool -sep ", " -tagsfromfile @ -keywords test.jpg

> However, sometimes it is desirable to have list items which contain a comma, and this is allowed:

>     exiftool -contributor="Harvey, Phil" -contributor="Marley, Bob" a.jpg

> But to distinguish these entries when extracting information, a different list separator must be used. For instance, the following command uses "`//`" to separate list items,

>     exiftool -contributor -sep "//" a.jpg

> and produces an output like this:

>     Contributor  : Harvey, Phil//Marley, Bob

> Note that the above examples overwrite any values which already existed in the original file for these tags. Alternatively, "`+=`" or "`-=` may be used to add to or remove from an existing list:

>     exiftool -keywords+="add this" -keywords-="remove this" DIR

> Using "`=`" is equivalent to "`+=`" in any command where the same tag is set with "`+=`" or "`-=`" in another assignment. (ie. existing values will be preserved unless specifically deleted with "`-=`".)

> To prevent duplication when adding new values, the values can be deleted then added back again in the same command. For example, the following command adds the keywords "one" and "two", ensuring that they are not duplicated if they already existed in the keywords of an image:

>     exiftool -keywords-=one -keywords+=one -keywords-=two -keywords+=two DIR

> When copying list tags using the `-tagsFromFile` option, values are copied individually to form proper lists. However, it gets a bit tricky when copying multiple tags to a single list tag: Here, any assignment to a tag overrides earlier assignments to the same tag in the command. For instance, this command

>     exiftool "-keywords<filename" "-keywords<comment" DIR

> writes only the Comment tag. (Note that `-tagsFromFile @` is implied by the "`<`" operation in this command, causing tags to be copied from the original file.) This may seem strange, but it prevents duplicate items from being added to a list when copying a group of tags from a file containing duplicate information. If you really want to add values from multiple tags, use the `-addTagsFromFile` option instead:

>     exiftool -addTagsFromFile @ "-keywords<filename" "-keywords<comment" DIR

> Note that as with "`=`" in the first three examples above, the "`<`" operation of the previous command overwrites any Keywords that existed previously in the original file. To add to or remove from the existing keywords, use "`+<`" or "`-<`".

18. "Special characters don't display properly in my Windows console"

> The Windows cmd.exe console uses an MS-DOS encoding by default (cp437 or something similar, depending on your region). The exiftool `-L` option changes exiftool to use Windows Latin1 (cp1252) which may help display some special characters, but for better results you can switch the console to UTF‑8 (the native ExifTool character encoding). This is especially useful if you are using the `-lang` option to translate exiftool output to another language. To change the the Windows console to UTF‑8, follow these steps:
> 1. Run "cmd.exe" to open a Windows console (select "Run..." from the Start menu and enter "cmd").
> 2. Change the font in the console Properties to any True Type font (ie. "TT Lucida Console").
> 3. Type "`chcp 65001`" then press RETURN at the command prompt.
> The console should now be able to display UTF‑8 characters (cp65001). But note that the TT Lucida Console font shipped with Windows, at least my version, may not be very complete, and doesn't seem to contain Japanese or Chinese characters.

> To permanently set the font, select "Save properties for future windows" when changing the font Properties. Also, you can automatically run "`chcp 65001`" every time "cmd.exe" is launched by changing the Windows Registry for the Command Processor: Run "regedit" and put "`chcp 65001`" into Data field for "HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\Autorun". (Unfortunately, I haven't been able to figure out how to change the code page for exiftool when launched via the Windows GUI. If anyone can figure out how to do this, please let me know.)

> On some Windows systems, using UTF‑8 doesn't seem to work. In this case, cp1252 may be the best alternative: Type "`chcp 1252`" in the console to switch to cp1252, then run exiftool with the `-L` option.

19. "How do I change the format of an extracted tag value?"

> The exiftool application has built-in options which allow you to disable print conversions (`-n`), escape special HTML characters (`-E`), and change the date/time (`-d`) and GPS coordinate (`-c`) formats, but sometimes more control is needed over the formatting of a value. In this case, user-defined Composite tags may be used to define custom formatting on a per-tag basis. Here is a basic config file example to illustrate the idea:

>     %Image::ExifTool::UserDefined = (
>        'Image::ExifTool::Composite' => {
>            MyArtist => {
>                Require => 'Artist',
>                ValueConv => '$val =~ tr/ /_/; $val',
>            },
>        },
>     );
>     1; # end

> The above config file defines a new tag called "MyArtist" which takes its value from the "Artist" tag after translating spaces to underlines. So, for example, an Artist value of "Phil Harvey" yields a corresponding MyArtist value of "Phil_Harvey".

> To activate the config file, it must be named "`.ExifTool_config`" and placed either in your home directory or in the same directory as the exiftool application. Note that the file name begins with a "`.`", so if you are in Windows or on a Mac you may need to rename the file from the command line since the GUI might not like file names beginning with a "`.`".

> User-defined Composite tags have many other features, including the ability to combine the values of multiple tags. See the config file documentation for more details about user-defined tags. Also, a quick search of the CPAN forum should reveal a number of user-defined tag examples.

Last revised May 27, 2009

<-- Back to ExifTool home page