[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] [tag mime type] problem Minivend 4.02
****** message to minivend-users from "Bill Randle" <billr@exgate.tek.com> ******
On Apr 6, 10:46am, Ayayu Infomation desk wrote:
} Subject: Re: [mv] [tag mime type] problem Minivend 4.02
}
} I could resolved problem.
}
} I modified the [tag] below in etc/report.
}
} This work fine.
} [tag op=mime
} type=text/plain;CHARSET=ISO-2022-JP
} description="Order Text" interpolate=1]
} [scratch order_text]
} [/tag]
}
} But this doesn't work.
} [tag mime type TEXT/PLAIN: CHARSET=ISO-2022-JP][/tag]
} [tag op=mime description="Order Text" interpolate=1]
} [scratch order_text]
} [/tag]
}
} Still [tag] genetates below.
} Content-Type: TEXT/PLAIN; charset=US-ASCII
As you noticed, the mime type you specify with [tag mime type xxx] is not
persistent - i.e. it doesn't get remembered, so the next time you use
[tag mime] it defaults to TEXT/PLAIN; charset=US-ASCII unless you
use the 'type' option again.
The original example from the simple demo:
[tag mime type TEXT/PLAIN: CHARSET=US-ASCII][/tag]
[tag op=mime description="Order Text" interpolate=1]
[scratch order_text]
[/tag]
is misleading because this tag:
[tag mime type TEXT/PLAIN: CHARSET=US-ASCII][/tag]
is effectively ignored, as far as setting content type.
The type could be made persitent, of course, say by adding something like
this to mime() in Interpolate.pm:
< my $type = $opt->{type} || 'TEXT/PLAIN; CHARSET=US-ASCII';
---
> my $type = $opt->{type} || $::Instance->{MIME_CONTENT_TYPE} ||
'TEXT/PLAIN; CHARSET=US-ASCII';
> $::Instance->{MIME_CONTENT_TYPE} = $type;
I won't comment on the appropriateness of saving the last set content-type.
It may or not be the "right" thing to do, I don't know.
-Bill
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list