sans_bom: Remove byte order mark (BOM) from 'httr::response' object or...

View source: R/bom.r

sans_bomR Documentation

Remove byte order mark (BOM) from httr::response object or character vector

Description

Performs the equivalent of content(resp, type="text") but removes the BOM before doing so. If a BOM is not detected, the function will return an error.

Usage

sans_bom(resp)

Arguments

resp

httr response object or a character vector

Details

What is a byte order mark?

Value

Converted content

Author(s)

@hrbrmstr

References

UTF-8, UTF-16, UTF-32 & BOM

Examples

library(httr)
foo <- GET("http://www.claritin.com/webservice/allergyforecast.php?zip=33956")
sans_bom(foo)

hrbrmstr/hrbrmisc documentation built on May 1, 2023, 7:39 a.m.